hedgewars/uGearsHandlersMess.pas
changeset 13984 817dc8b67b0d
parent 13983 cde9920150c6
child 13985 1670fc3957df
--- a/hedgewars/uGearsHandlersMess.pas	Fri Oct 26 15:48:52 2018 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Oct 26 15:52:07 2018 +0200
@@ -6270,14 +6270,22 @@
     end;
     if Gear^.Message and (gmUp or gmDown) <> 0 then
         begin
-        StopSoundChan(Gear^.SoundChannel);
-        Gear^.SoundChannel:= -1;
+        if (Gear^.Tag <> 2) then
+            begin
+            StopSoundChan(Gear^.SoundChannel);
+            Gear^.SoundChannel:= LoopSound(sndIceBeamIdle);
+            Gear^.Tag:= 2;
+            end;
         if GameTicks mod 40 = 0 then dec(Gear^.Health)
         end
     else
         begin
-        if Gear^.SoundChannel = -1 then
-            Gear^.SoundChannel := LoopSound(sndIceBeam);
+        if (Gear^.Tag <> 1) then
+            begin
+            StopSoundChan(Gear^.SoundChannel);
+            Gear^.SoundChannel:= LoopSound(sndIceBeam);
+            Gear^.Tag:= 1;
+            end;
         if GameTicks mod 10 = 0 then dec(Gear^.Health)
         end
 end;