Remove saving from ctf_pvp_engine

This commit is contained in:
rubenwardy 2019-08-28 17:05:59 +01:00
parent a735266eb3
commit e53732f41e
16 changed files with 31 additions and 349 deletions

View file

@ -103,7 +103,6 @@ function ctf_flag.add(team, pos)
pos.team = team
table.insert(ctf.team(team).flags,pos)
ctf.needs_save = true
end
function ctf_flag.update(pos)
@ -135,7 +134,6 @@ function ctf_flag.update(pos)
if not ctf.team(flag_team_data.team).data.color then
ctf.team(flag_team_data.team).data.color = "red"
ctf.needs_save = true
end
if flag_team_data.claimed then

View file

@ -79,8 +79,6 @@ local function do_capture(attname, flag, returned)
ctf_flag.registered_on_capture[i](attname, flag)
end
end
ctf.needs_save = true
end
local function player_drop_flag(player)
@ -227,8 +225,6 @@ ctf_flag = {
team.spawn = pos
end
ctf.needs_save = true
local pos2 = {
x = pos.x,
y = pos.y + 1,
@ -237,7 +233,6 @@ ctf_flag = {
if not team.data.color then
team.data.color = "red"
ctf.needs_save = true
end
minetest.set_node(pos2, {name="ctf_flag:flag_top_"..team.data.color})

View file

@ -141,6 +141,9 @@ local function update_flag_drops()
" seconds to capture the flag before it returns.")
end
end
ctf_flag.assert_flags()
minetest.after(5, update_flag_drops)
end
minetest.after(5, update_flag_drops)