fix check for static gears
authoralfadur
Wed, 07 Aug 2019 00:54:42 +0300
changeset 15325 b043b5d5219a
parent 15324 b761efebe3c4
child 15326 0076bf602969
fix check for static gears
hedgewars/uCollisions.pas
--- a/hedgewars/uCollisions.pas	Tue Aug 06 23:33:08 2019 +0200
+++ b/hedgewars/uCollisions.pas	Wed Aug 07 00:54:42 2019 +0300
@@ -1056,8 +1056,8 @@
 
     while Gear <> nil do
         begin
-        if (Gear^.Kind in [gtCase, gtExplosives, gtTarget, gtKnife, gtMine, gtAirMine, gtSMine]) or
-            ((Gear^.Kind = gtHedgehog) and (Gear^.CollisionIndex = 0)) then
+        if (Gear^.Kind = gtAirMine) or
+            ((Gear^.Kind in [gtCase, gtExplosives, gtTarget, gtKnife, gtMine, gtHedgehog, gtSMine]) and (Gear^.CollisionIndex = -1)) then
             begin
             gx:= hwRound(Gear^.X);
             gy:= hwRound(Gear^.Y);