hedgewars/GSHandlers.inc
changeset 7777 e0be9fbc21b4
parent 7767 d1ea9b3f543e
child 7784 cf6261f7fdb5
--- a/hedgewars/GSHandlers.inc	Sun Oct 21 17:00:35 2012 +0400
+++ b/hedgewars/GSHandlers.inc	Sun Oct 21 10:20:48 2012 -0400
@@ -282,10 +282,12 @@
     else
         Gear^.State := Gear^.State or gstMoving;
 
-    if (Gear^.nImpactSounds > 0) and (((Gear^.Kind <> gtMine) and (Gear^.Damage <> 0))
-    or ((Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving))) and(((Gear^.Radius < 3) and (Gear^.dY < -_0_1))
-    or ((Gear^.Radius >= 3) and ((Gear^.dX.QWordValue > _0_1.QWordValue)
-    or (Gear^.dY.QWordValue > _0_1.QWordValue)))) then
+    if (Gear^.nImpactSounds > 0) and 
+        (Gear^.State and gstCollision <> 0) and
+        (((Gear^.Kind <> gtMine) and (Gear^.Damage <> 0)) or (Gear^.State and gstMoving <> 0)) and
+        (((Gear^.Radius < 3) and (Gear^.dY < -_0_1)) or
+            ((Gear^.Radius >= 3) and 
+                ((Gear^.dX.QWordValue > _0_1.QWordValue) or (Gear^.dY.QWordValue > _0_1.QWordValue)))) then
         PlaySound(TSound(ord(Gear^.ImpactSound) + LongInt(GetRandom(Gear^.nImpactSounds))), true);
 end;