Reset sprint on new match (#893)
This commit is contained in:
parent
038dd3c1e5
commit
1831da8496
2 changed files with 8 additions and 1 deletions
|
@ -35,6 +35,13 @@ local function setSprinting(player, info, sprinting)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ctf_match.register_on_new_match(function()
|
||||||
|
for pname in pairs(players) do
|
||||||
|
local player = minetest.get_player_by_name(pname)
|
||||||
|
players[player:get_player_name()].stamina = STAMINA_MAX
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
for name, info in pairs(players) do
|
for name, info in pairs(players) do
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = sprint
|
name = sprint
|
||||||
depends = medkits, physics
|
depends = medkits, physics, ctf_match
|
||||||
optional_depends = hudbars
|
optional_depends = hudbars
|
||||||
|
|
Loading…
Reference in a new issue