aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod
diff options
context:
space:
mode:
authorDBmaoha <56738369+DBmaoha@users.noreply.github.com>2022-10-22 02:51:48 +0800
committerGitHub <noreply@github.com>2022-10-21 19:51:48 +0100
commit1714d2d329bef4f970715b12133d1d676b7046ac (patch)
tree1bafe80a2abb40bd374b3bd9507a8423df9fe145 /Northstar.CustomServers/mod
parentee0613f81248335191170ffccada19af0e85524c (diff)
downloadNorthstarMods-1714d2d329bef4f970715b12133d1d676b7046ac.tar.gz
NorthstarMods-1714d2d329bef4f970715b12133d1d676b7046ac.zip
Fixed EarnMeter OverDrive not reset after player died (#486)v1.10.6-rc1v1.10.6
Diffstat (limited to 'Northstar.CustomServers/mod')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut8
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 )
{