diff options
Diffstat (limited to 'Northstar.Custom')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut index faa92480..2ce93013 100644 --- a/Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut @@ -8,7 +8,9 @@ void function CustomAirAccelVars_Init() #if SERVER AddCallback_OnPlayerRespawned( ApplyCustomPlayerAirAccel ) - AddCallback_OnPilotBecomesTitan( ApplyCustomPlayerAirAccelFromTitan ) // not sure if necessary but assuming it is + AddCallback_OnTitanBecomesPilot( ApplyCustomPlayerAirAccelFromTitan ) // airaccel is reset after player leaves titan + AddCallback_OnPilotBecomesTitan( ApplyCustomPlayerAirAccelFromTitan ) // airaccel is also reset after player enters titan + AddCallback_OnPlayerGetsNewPilotLoadout( ApplyCustomPlayerAirAccelOnLoadoutChange ) // airaccel is also reset on loadout change for some reason #endif } @@ -22,4 +24,9 @@ void function ApplyCustomPlayerAirAccelFromTitan( entity player, entity titan ) { player.kv.airAcceleration = GetCurrentPlaylistVarInt( "custom_air_accel_pilot", int( player.GetPlayerSettingsField( "airAcceleration" ) ) ) } -#endif
\ No newline at end of file + +void function ApplyCustomPlayerAirAccelOnLoadoutChange( entity player, PilotLoadoutDef loadout ) +{ + player.kv.airAcceleration = GetCurrentPlaylistVarInt( "custom_air_accel_pilot", int( player.GetPlayerSettingsField( "airAcceleration" ) ) ) +} +#endif |