Fix EOM shown before winner_player is initialized
This commit is contained in:
parent
04e6a43cd2
commit
5b3efd8909
1 changed files with 2 additions and 2 deletions
|
@ -142,7 +142,7 @@ end)
|
||||||
local winner_team = "-"
|
local winner_team = "-"
|
||||||
local winner_player = "-"
|
local winner_player = "-"
|
||||||
|
|
||||||
ctf_flag.register_on_capture(function(name, flag)
|
table.insert(ctf_flag.registered_on_capture, 1, function(name, flag)
|
||||||
local main, match = ctf_stats.player(name)
|
local main, match = ctf_stats.player(name)
|
||||||
if main and match then
|
if main and match then
|
||||||
main.captures = main.captures + 1
|
main.captures = main.captures + 1
|
||||||
|
@ -162,7 +162,7 @@ ctf_match.register_on_winner(function(winner)
|
||||||
|
|
||||||
-- Show match summary
|
-- Show match summary
|
||||||
local fs = ctf_stats.get_formspec_match_summary(ctf_stats.current,
|
local fs = ctf_stats.get_formspec_match_summary(ctf_stats.current,
|
||||||
winner_team, winner_player, os.time()-ctf_stats.start)
|
winner_team, winner_player, os.time() - ctf_stats.start)
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
minetest.show_formspec(player:get_player_name(), "ctf_stats:eom", fs)
|
minetest.show_formspec(player:get_player_name(), "ctf_stats:eom", fs)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue