mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 19:45:22 +09:00
Merge pull request #43 from trumank/fix-bonus-respawn-marker
Fix body marker not appearing when bonus respawn is applied
This commit is contained in:
@@ -55,5 +55,12 @@ Event.register(defines.events.on_pre_player_died,function(event)
|
||||
local player = Game.get_player(event)
|
||||
if Ranking.get_rank(player):allowed('bonus-respawn') then
|
||||
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,
|
||||
cause = event.cause
|
||||
}
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user