aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts
diff options
context:
space:
mode:
authorBobbyperson <bobbyperson12345@gmail.com>2024-11-18 17:48:43 -0500
committerGitHub <noreply@github.com>2024-11-18 23:48:43 +0100
commitd941fc3f0b062b3485ad2f94c4d6edbdc7f45aab (patch)
treeae0e0d6bc390fef7294b18169804c9166c0cd6c3 /Northstar.Client/mod/scripts/vscripts
parent0528f9fd73d174f4d7094ae99ee6b1b0f4f57e83 (diff)
downloadNorthstarMods-d941fc3f0b062b3485ad2f94c4d6edbdc7f45aab.tar.gz
NorthstarMods-d941fc3f0b062b3485ad2f94c4d6edbdc7f45aab.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.
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/client/cl_screenfade.gnut9
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
{