Fix short sound breakdown shortly after using time box
authorWuzzy <almikes@aol.com>
Sun, 08 Oct 2017 16:30:42 +0200
changeset 12672 c98179b00740
parent 12671 87b3009f51c3
child 12673 28e859ea393b
Fix short sound breakdown shortly after using time box
ChangeLog.txt
hedgewars/uGearsHandlersMess.pas
--- a/ChangeLog.txt	Sun Oct 08 04:57:28 2017 +0200
+++ b/ChangeLog.txt	Sun Oct 08 16:30:42 2017 +0200
@@ -52,6 +52,7 @@
  * Fixed Birdy descending into water when hog took damage or died before it got picked up
  * Fixed teleportation being able to teleport in land if you clicked in the "dark" area of the wrap world edge
  * Fixed team getting infinite ammo when stockpiling >= 100 ammo (max. finite ammo is now limited to 99)
+ * Fixed short sound effect breakdown right after using a time box
  * Remove buggy /finish chat command
  * Various other fixes
 
--- a/hedgewars/uGearsHandlersMess.pas	Sun Oct 08 04:57:28 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Oct 08 16:30:42 2017 +0200
@@ -5748,6 +5748,7 @@
 if Gear^.Pos = 2 then
     begin
     StopSoundChan(Gear^.SoundChannel);
+    Gear^.SoundChannel:= -1;
     if (Gear^.Timer = 0) then
         begin
         if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible = 0) then
@@ -5796,6 +5797,7 @@
 if (Gear^.Pos = 3) and (Gear^.Power = 0) then
     begin
     StopSoundChan(Gear^.SoundChannel);
+    Gear^.SoundChannel:= -1;
     if HH^.GearHidden = nil then
         begin
         DeleteGear(Gear);