From 5e3578ae00cc1d6879aab23d78ba6dc33087256e Mon Sep 17 00:00:00 2001 From: ANAND Date: Sat, 31 Aug 2019 12:48:46 +0530 Subject: [PATCH] ctf_map: Dofile base.lua only when `ctf` exists This prevents a crash when running in map-maker mode, as base.lua (which is unnecessarily dofile'd) contains code which re-defines `ctf.get_spawn` --- mods/ctf/ctf_map/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ctf/ctf_map/init.lua b/mods/ctf/ctf_map/init.lua index 04efda0..efd3468 100644 --- a/mods/ctf/ctf_map/init.lua +++ b/mods/ctf/ctf_map/init.lua @@ -15,9 +15,9 @@ local modpath = minetest.get_modpath("ctf_map") dofile(modpath .. "/nodes.lua") dofile(modpath .. "/emerge.lua") dofile(modpath .. "/barrier.lua") -dofile(modpath .. "/base.lua") if minetest.get_modpath("ctf") then + dofile(modpath .. "/base.lua") dofile(modpath .. "/chest.lua") dofile(modpath .. "/give_initial_stuff.lua") dofile(modpath .. "/schem_map.lua")