diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-22 16:46:49 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-22 16:46:49 +0000 |
commit | fb32cb1b780c1169a834c951bc0c928199a2b59e (patch) | |
tree | e2435cc869fed0fa3f7c3d187335d2350b8b1e14 /Northstar.CustomServers/mod/scripts/vscripts/earn_meter | |
parent | dade102a0d4d14ba5ee560022b8e2f1ddf960977 (diff) | |
download | NorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.tar.gz NorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.zip |
playtest fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/earn_meter')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut | 28 |
1 files changed, 23 insertions, 5 deletions
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 c698cb36..6682807b 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 @@ -22,6 +22,8 @@ void function EarnMeterMP_SetTitanLoadout( entity player ) { if ( EarnMeterMP_IsTitanEarnGametype() ) PlayerEarnMeter_SetGoal( player, EarnObject_GetByRef( GetTitanLoadoutForPlayer( player ).titanClass ) ) + else + PlayerEarnMeter_SetGoal( player, EarnObject_GetByRef( GetSelectedBurncardRefFromWeaponOrPlayer( null, player ) ) ) } void function EarnMeterMP_SetPassiveMeterGainEnabled( bool enabled ) @@ -46,6 +48,8 @@ void function SetupPlayerEarnMeter( entity player ) PlayerEarnMeter_SetGoal( player, EarnObject_GetByRef( GetTitanLoadoutForPlayer( player ).titanClass ) ) PlayerEarnMeter_EnableGoal( player ) // prevents goalstate from being set incorrectly } + else + PlayerEarnMeter_SetGoal( player, EarnObject_GetByRef( GetSelectedBurncardRefFromWeaponOrPlayer( null, player ) ) ) // 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? @@ -66,10 +70,9 @@ void function OnPlaying() { Riff_ForceTitanAvailability( eTitanAvailability.Custom ) // doesn't seem to affect anything aside from preventing some annoying client stuff svGlobal.titanAvailabilityCheck = IsTitanAvailable - SetCallback_EarnMeterGoalEarned( EarnMeterMP_TitanEarned ) } - else // if no titans from earnmeter in this mode, just reset when we finish meter - SetCallback_EarnMeterGoalEarned( PlayerEarnMeter_Reset ) + + SetCallback_EarnMeterGoalEarned( EarnMeterMP_TitanEarned ) } void function OnPlayerRespawned( entity player ) @@ -179,6 +182,21 @@ void function EarnMeterMP_BoostEarned( entity player ) void function EarnMeterMP_TitanEarned( entity player ) { - SetTitanAvailable( player ) - //Remote_CallFunction_Replay( player, "ServerCallback_TitanReadyMessage" ) // broken for some reason + if ( EarnMeterMP_IsTitanEarnGametype() ) + { + SetTitanAvailable( player ) + //Remote_CallFunction_Replay( player, "ServerCallback_TitanReadyMessage" ) // broken for some reason + } + else + { + PlayerEarnMeter_Reset( player ) + // reset rewards + string burncardRef = GetSelectedBurncardRefFromWeaponOrPlayer( null, player ) + PlayerEarnMeter_SetReward( player, EarnObject_GetByRef( burncardRef ) ) + PlayerEarnMeter_SetRewardFrac( player, BurnReward_GetByRef( burncardRef ).cost ) + PlayerEarnMeter_EnableReward( player ) + + if ( PlayerEarnMeter_GetRewardFrac( player ) != 0 ) + PlayerEarnMeter_EnableReward( player ) + } }
\ No newline at end of file |