diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-04-09 22:01:35 +0100 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-04-09 23:10:59 +0200 |
commit | 66eef34dcf28f3a52f10bd046fa6f6a9b189cd70 (patch) | |
tree | f35cf7dcf56d1286a7fd225785af732a9011352e | |
parent | b74c4d315612431146148669f593657f8da08afb (diff) | |
download | NorthstarMods-66eef34dcf28f3a52f10bd046fa6f6a9b189cd70.tar.gz NorthstarMods-66eef34dcf28f3a52f10bd046fa6f6a9b189cd70.zip |
Fix crash issues on infection and fastball respawn (#294)v1.6.2-rc1v1.6.2
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut | 2 | ||||
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_inf.gnut | 10 |
2 files changed, 10 insertions, 2 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 f5fae006..a8ce6a40 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut @@ -92,7 +92,7 @@ void function FastballRespawnPlayerEffects_Threaded() // sometimes this seems to get called before the player has respawned clientside, so we just wait until the client thinks they're alive entity player = GetLocalClientPlayer() - while ( !IsAlive( player ) ) + while ( !IsAlive( player ) || !IsValid( player.GetCockpit() ) ) WaitFrame() StartParticleEffectOnEntity( player.GetCockpit(), GetParticleSystemIndex( $"P_pod_screen_lasers_OUT" ), FX_PATTACH_ABSORIGIN_FOLLOW, -1 ) diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_inf.gnut index 56763bd4..9374278a 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_inf.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_inf.gnut @@ -22,9 +22,17 @@ void function ClGamemodeInfection_Init() void function ServerCallback_YouAreInfected() { + thread ServerCallback_YouAreInfected_Threaded() +} + +void function ServerCallback_YouAreInfected_Threaded() +{ // heavily based on mfd code entity localPlayer = GetLocalViewPlayer() - + + while ( !IsValid( localPlayer.GetCockpit() ) ) + WaitFrame() + StartParticleEffectOnEntity( localPlayer.GetCockpit(), GetParticleSystemIndex( $"P_MFD" ), FX_PATTACH_ABSORIGIN_FOLLOW, -1 ) EmitSoundOnEntity( localPlayer, "UI_InGame_MarkedForDeath_PlayerMarked" ) HideEventNotification() |