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`
This commit is contained in:
ANAND 2019-08-31 12:48:46 +05:30
parent f04663fc6c
commit 5e3578ae00
No known key found for this signature in database
GPG key ID: 3AD8A3C4A51AAB97

View file

@ -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")