From b12f209c95b4107780260e60dcf2048af2f0150d Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 26 Nov 2015 17:10:31 +0000 Subject: [PATCH] Stop crash on ctf_flag.assert_flag() during load time --- mods/ctf_match/matches.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ctf_match/matches.lua b/mods/ctf_match/matches.lua index d85f6fa..b0cfd4e 100644 --- a/mods/ctf_match/matches.lua +++ b/mods/ctf_match/matches.lua @@ -59,7 +59,10 @@ ctf.register_on_new_game(function() }) ctf_flag.add(name, flag) - ctf_flag.assert_flag(flag) + + minetest.after(0, function() + ctf_flag.assert_flag(flag) + end) else ctf.warning("match", "Invalid team setup: " .. dump(v)) end