aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/earn_meter
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/earn_meter')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut22
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut24
2 files changed, 23 insertions, 23 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 691f07fb..dda84976 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
@@ -39,8 +39,6 @@ global function SharedEarnMeter_AddEarnedAndOwned
global function PlayerEarnMeter_SetEnabled
global function PlayerEarnMeter_Enabled
-global function PlayerEarnMeter_SetBoostByRef
-
global struct EarnMeterThresholdEarnedStruct
{
float threshold
@@ -507,24 +505,4 @@ void function PlayerEarnMeter_SetEnabled( bool enabled )
bool function PlayerEarnMeter_Enabled()
{
return file.earnMeterEnabled
-}
-
-void function PlayerEarnMeter_SetBoostByRef( entity player, string boostRef ) {
- EarnObject earnobject = EarnObject_GetByRef( boostRef )
- BurnReward burncard = BurnReward_GetByRef( boostRef )
-
- if ( Riff_BoostAvailability() != eBoostAvailability.Disabled )
- {
- PlayerEarnMeter_SetReward( player, earnobject ) // pretty sure this works?
- PlayerEarnMeter_SetRewardFrac( player, burncard.cost )
- PlayerEarnMeter_EnableReward( player )
- }
-
- if ( EarnMeterMP_IsTitanEarnGametype() )
- {
- PlayerEarnMeter_SetGoal( player, EarnObject_GetByRef( GetTitanLoadoutForPlayer( player ).titanClass ) )
- PlayerEarnMeter_EnableGoal( player ) // prevents goalstate from being set incorrectly
- }
- else
- PlayerEarnMeter_SetGoal( player, earnobject )
} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
index 1aa0f042..4417168a 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
@@ -2,6 +2,7 @@ untyped
global function Sv_EarnMeterMP_Init
global function EarnMeterMP_SetTitanLoadout
global function EarnMeterMP_SetPassiveMeterGainEnabled
+global function EarnMeterMP_SetBoostByRef
struct {
float playingStartTime
@@ -36,7 +37,7 @@ void function SetupPlayerEarnMeter( entity player )
PlayerEarnMeter_Reset( player )
string burncardRef = GetSelectedBurnCardRef( player )
- PlayerEarnMeter_SetBoostByRef( player, burncardRef )
+ EarnMeterMP_SetBoostByRef( player, burncardRef )
// catchup bonus for late joiners
// todo: maths on this is fine but for some reason it won't set correctly, could be getting reset somewhere?
@@ -176,4 +177,25 @@ void function EarnMeterMP_TitanEarned( entity player )
if ( PlayerEarnMeter_GetRewardFrac( player ) != 0 )
PlayerEarnMeter_EnableReward( player )
}
+}
+
+void function EarnMeterMP_SetBoostByRef( entity player, string boostRef )
+{
+ EarnObject earnobject = EarnObject_GetByRef( boostRef )
+ BurnReward burncard = BurnReward_GetByRef( boostRef )
+
+ if ( Riff_BoostAvailability() != eBoostAvailability.Disabled )
+ {
+ PlayerEarnMeter_SetReward( player, earnobject ) // pretty sure this works?
+ PlayerEarnMeter_SetRewardFrac( player, burncard.cost )
+ PlayerEarnMeter_EnableReward( player )
+ }
+
+ if ( EarnMeterMP_IsTitanEarnGametype() )
+ {
+ PlayerEarnMeter_SetGoal( player, EarnObject_GetByRef( GetTitanLoadoutForPlayer( player ).titanClass ) )
+ PlayerEarnMeter_EnableGoal( player ) // prevents goalstate from being set incorrectly
+ }
+ else
+ PlayerEarnMeter_SetGoal( player, earnobject )
} \ No newline at end of file