diff options
author | hummusbird <hummusbirb@gmail.com> | 2022-01-02 22:34:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 19:34:36 -0300 |
commit | 18b691b3d2ba193c7358897fd913fcfa5d52341d (patch) | |
tree | e7ee0807509b36c182dc233735d518385ce82c2b /Northstar.Custom/mod | |
parent | fc008147477b16c3b4fccb8d8d771ae924dde36a (diff) | |
download | NorthstarMods-18b691b3d2ba193c7358897fd913fcfa5d52341d.tar.gz NorthstarMods-18b691b3d2ba193c7358897fd913fcfa5d52341d.zip |
Fix airaccel reset on leaving titan (#51)
* Fix airaccel reset on leaving titan
https://youtu.be/Ir_YT8aTyzY
* fix for loadout change and enter titan
* fix accidental space
* oops :P
Diffstat (limited to 'Northstar.Custom/mod')
-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 |