Fix taunts playing too fast after a shot
authorWuzzy <Wuzzy2@mail.ru>
Thu, 01 Nov 2018 01:07:26 +0100
changeset 14053 38eb5937169e
parent 14052 9c817b2eedae
child 14054 3185fb34f3b5
Fix taunts playing too fast after a shot Fixes regression introduced by bf14c7c1be02
hedgewars/uSound.pas
--- 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 + ' ');