diff --git a/mods/other/sprint/init.lua b/mods/other/sprint/init.lua index c1dd642..b77e648 100644 --- a/mods/other/sprint/init.lua +++ b/mods/other/sprint/init.lua @@ -35,6 +35,13 @@ local function setSprinting(player, info, sprinting) 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) for name, info in pairs(players) do local player = minetest.get_player_by_name(name) diff --git a/mods/other/sprint/mod.conf b/mods/other/sprint/mod.conf index 995b058..e58b0f1 100644 --- a/mods/other/sprint/mod.conf +++ b/mods/other/sprint/mod.conf @@ -1,3 +1,3 @@ name = sprint -depends = medkits, physics +depends = medkits, physics, ctf_match optional_depends = hudbars