hedgewars/uSound.pas
branch0.9.17
changeset 6360 eca20f8990e2
parent 6072 e3dc802965d6
child 6362 ceacd1b61833
--- a/hedgewars/uSound.pas	Sun Nov 13 13:05:19 2011 -0500
+++ b/hedgewars/uSound.pas	Sun Nov 13 13:18:56 2011 -0500
@@ -287,6 +287,13 @@
 var i : LongInt;
 begin
     if (not isSoundEnabled) or fastUntilLag or ((LastVoice.snd = snd) and  (LastVoice.voicepack = voicepack)) then exit;
+    if (snd = sndVictory) or (snd = sndFlawless) then
+        begin
+        for i:= 1 to Succ(chanTPU) do StopSound(i);
+        for i:= 0 to 7 do VoiceList[i].snd:= sndNone;
+        LastVoice.snd:= sndNone;
+        end;
+
     i:= 0;
     while (i<8) and (VoiceList[i].snd <> sndNone) do inc(i);