Engine:
authorsmxx
Thu, 04 Feb 2010 14:35:31 +0000
changeset 2744 803d0142594e
parent 2743 39d097ac2276
child 2745 11fce231f24a
Engine: * Avoid playing the same sound looped multiple times as its impossible to stop older copies then (at least for now)
hedgewars/uSound.pas
--- a/hedgewars/uSound.pas	Wed Feb 03 23:36:42 2010 +0000
+++ b/hedgewars/uSound.pas	Thu Feb 04 14:35:31 2010 +0000
@@ -156,6 +156,7 @@
 var loops: LongInt;
 begin
 if (not isSoundEnabled) or fastUntilLag then exit;
+if infinite and (lastChan[snd] <> -1) then exit;
 if infinite then loops:= -1 else loops:= 0;
 
 if (voicepack <> nil) and (voicepack^.chunks[snd] <> nil) then