hedgewars/uSound.pas
changeset 14058 38eb5937169e
parent 14047 006f97a6f6a7
child 14073 859a41b137d4
--- a/hedgewars/uSound.pas	Thu Nov 01 02:55:22 2018 +0300
+++ b/hedgewars/uSound.pas	Thu Nov 01 01:07:26 2018 +0100
@@ -550,7 +550,8 @@
 end;
 
 function PlaySoundV(snd: TSound; voicepack: PVoicepack; keepPlaying, ignoreMask, soundAsMusic: boolean): boolean;
-var s:shortstring;
+var s: shortstring;
+tempSnd: TSound;
 rwops: PSDL_RWops;
 begin
     s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
@@ -572,9 +573,9 @@
             // Fallback taunts
             if (not pfsExists(s)) then
                 begin
-                snd := GetFallbackV(snd);
-                if snd = sndNone then
-                    exit;
+                tempSnd := GetFallbackV(snd);
+                if tempSnd <> sndNone then
+                    snd := tempSnd;
                 s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
                 end;
             WriteToConsole(msgLoading + s + ' ');