diff options
author | Coopyy <pat.pvp.unturned@gmail.com> | 2022-02-19 22:12:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-20 01:12:38 -0300 |
commit | 8e7a9198057775f3aad4c676dc533aeadd54879e (patch) | |
tree | fc59d6a29bd509b4b8fb3af589b81aa0b2390415 /Northstar.Custom/mod/scripts/vscripts | |
parent | c2d7b22d67a76ebacb4b1c80452a693c56c0ab21 (diff) | |
download | NorthstarMods-8e7a9198057775f3aad4c676dc533aeadd54879e.tar.gz NorthstarMods-8e7a9198057775f3aad4c676dc533aeadd54879e.zip |
Prevent fastball client valid crashes (#235)
theres no checks if the panel is valid or not
https://cdn.discordapp.com/attachments/941129346612068373/944097224885952552/20220217_201811.jpg
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut index f64658cf..f5fae006 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut @@ -31,6 +31,8 @@ void function FastballCreateRui( entity player ) void function ServerCallback_FastballUpdatePanelRui( int panelHandle, int id ) { entity panel = GetEntityFromEncodedEHandle( panelHandle ) + if (!IsValid(panel)) + return var rui if ( id == 0 ) rui = file.panelARui @@ -94,4 +96,4 @@ void function FastballRespawnPlayerEffects_Threaded() WaitFrame() StartParticleEffectOnEntity( player.GetCockpit(), GetParticleSystemIndex( $"P_pod_screen_lasers_OUT" ), FX_PATTACH_ABSORIGIN_FOLLOW, -1 ) -}
\ No newline at end of file +} |