Fix taunts playing too fast after a shot
Fixes regression introduced by bf14c7c1be02
--- 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 + ' ');