Merge branch 'playerleavebugfix' into 'master'
Closes #3 Closes #3 See merge request debiankaios/tnttag!5
This commit is contained in:
commit
dbf873142d
4
api.lua
4
api.lua
@ -46,6 +46,10 @@ function tnttag.untagplayer(p_name, arena)
|
||||
tnttag.remove_tnthead(p_name)
|
||||
end
|
||||
|
||||
-- get the get tagstatus
|
||||
function tnttag.gettagstatus(p_name, arena)
|
||||
return arena.players[p_name].tagged
|
||||
end
|
||||
|
||||
-- Thankyou to chmodsayshello ↓
|
||||
function tnttag.get_new_tagger_count(arena, num_tagger)
|
||||
|
7
auto.lua
7
auto.lua
@ -36,6 +36,13 @@ arena_lib.on_celebration("tnttag", function(arena, winner)
|
||||
end)
|
||||
|
||||
arena_lib.on_time_tick("tnttag", function(arena)
|
||||
local taggersnum = 0
|
||||
for p_name,stats in pairs(arena.players) do
|
||||
if tnttag.gettagstatus(p_name, arena) then taggersnum = taggersnum + 1 end
|
||||
end
|
||||
if taggersnum == 0 then
|
||||
arena.current_time=arena.current_time-arena.current_time%arena.wavetime
|
||||
end
|
||||
tnttag.update_wave_timer_hud(arena)
|
||||
tnttag.update_player_count_hud(arena)
|
||||
if arena.current_time%arena.wavetime == 0 then
|
||||
|
Loading…
x
Reference in New Issue
Block a user