# HG changeset patch
# User smxx
# Date 1265294131 0
# Node ID 803d0142594e49f2fea4a71f1c80eda26d57f895
# Parent  39d097ac2276bb2a19ff441efd05ece8859b3175
Engine:
* Avoid playing the same sound looped multiple times as its impossible to stop older copies then (at least for now)

diff -r 39d097ac2276 -r 803d0142594e 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