diff options
author | DBmaoha <56738369+DBmaoha@users.noreply.github.com> | 2022-10-22 02:51:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 19:51:48 +0100 |
commit | 1714d2d329bef4f970715b12133d1d676b7046ac (patch) | |
tree | 1bafe80a2abb40bd374b3bd9507a8423df9fe145 | |
parent | ee0613f81248335191170ffccada19af0e85524c (diff) | |
download | NorthstarMods-1714d2d329bef4f970715b12133d1d676b7046ac.tar.gz NorthstarMods-1714d2d329bef4f970715b12133d1d676b7046ac.zip |
Fixed EarnMeter OverDrive not reset after player died (#486)v1.10.6-rc1v1.10.6
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut index dda84976..b4e77375 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut @@ -315,12 +315,12 @@ void function PlayerEarnMeter_Empty( entity player ) PlayerEarnMeter_SetRewardFrac( player, 0.0 ) } - void function EarnMeterDecayThink( entity player ) { player.EndSignal( "OnDeath" ) player.Signal( "EarnMeterDecayThink" ) player.EndSignal( "EarnMeterDecayThink" ) + thread OverDriveClearOnDeath( player ) if ( EarnMeter_DecayHold() < 0 ) return @@ -348,6 +348,12 @@ void function EarnMeterDecayThink( entity player ) } } +void function OverDriveClearOnDeath( entity player ) +{ + player.EndSignal( "OnDestroy" ) + player.WaitSignal( "OnDeath" ) + PlayerEarnMeter_SetEarnedFrac( player, PlayerEarnMeter_GetOwnedFrac( player ) ) +} bool function PlayerEarnMeter_TryMakeGoalAvailable( entity player ) { |