diff options
author | Bobbyperson <bobbyperson12345@gmail.com> | 2024-11-18 17:48:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-18 23:48:43 +0100 |
commit | d941fc3f0b062b3485ad2f94c4d6edbdc7f45aab (patch) | |
tree | ae0e0d6bc390fef7294b18169804c9166c0cd6c3 | |
parent | 0528f9fd73d174f4d7094ae99ee6b1b0f4f57e83 (diff) | |
download | NorthstarMods-1.28.6.tar.gz NorthstarMods-1.28.6.zip |
Fix client crash during final killcam (#900)HEADv1.28.6-rc2v1.28.6main
By adding a sanity check to see if the passed string is empty or not.
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/client/cl_screenfade.gnut | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/client/cl_screenfade.gnut b/Northstar.Client/mod/scripts/vscripts/client/cl_screenfade.gnut index 9844b65b..deccbac2 100644 --- a/Northstar.Client/mod/scripts/vscripts/client/cl_screenfade.gnut +++ b/Northstar.Client/mod/scripts/vscripts/client/cl_screenfade.gnut @@ -247,8 +247,10 @@ void function PlayerPainSoundThread() ourPlayer = localViewPlayer; soundLayer2Start = GetPainSound( ourPlayer, "sound_pain_layer2_start" ) soundLayer2Loop = GetPainSound( ourPlayer, "sound_pain_layer2_loop" ) - EmitSoundOnEntity( ourPlayer, soundLayer2Start ) - EmitSoundOnEntity( ourPlayer, soundLayer2Loop ) + if ( soundLayer2Start != "" ) + EmitSoundOnEntity( ourPlayer, soundLayer2Start ) + if ( soundLayer2Loop != "" ) + EmitSoundOnEntity( ourPlayer, soundLayer2Loop ) } else { @@ -274,7 +276,8 @@ void function PlayerPainSoundThread() ourPlayer = localViewPlayer soundLayer3Loop = GetPainSound( ourPlayer, "sound_pain_layer3_loop" ) soundLayer3End = GetPainSound( ourPlayer, "sound_pain_layer3_end" ) - EmitSoundOnEntity( ourPlayer, soundLayer3Loop ) + if ( soundLayer3Loop != "" ) + EmitSoundOnEntity( ourPlayer, soundLayer3Loop ) } else { |