mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 21:01:39 +09:00
Fix body marker not appearing when bonus respawn is applied
This commit is contained in:
@@ -55,5 +55,7 @@ Event.register(defines.events.on_pre_player_died,function(event)
|
|||||||
local player = Game.get_player(event)
|
local player = Game.get_player(event)
|
||||||
if Ranking.get_rank(player):allowed('bonus-respawn') then
|
if Ranking.get_rank(player):allowed('bonus-respawn') then
|
||||||
player.ticks_to_respawn = 120
|
player.ticks_to_respawn = 120
|
||||||
|
-- manually dispatch death event because it is not fired when ticks_to_respawn is set pre death
|
||||||
|
Event.dispatch({name = defines.events.on_player_died, tick = event.tick, player_index = event.player_index})
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
Reference in New Issue
Block a user