fix minigun bullet collision detection
authoralfadur
Mon, 09 May 2022 19:10:43 +0300
changeset 15842 4172debdff61
parent 15841 e111e5acde64
child 15843 a722c8e86573
fix minigun bullet collision detection
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsHandlersMess.pas	Tue Apr 26 14:35:21 2022 -0400
+++ b/hedgewars/uGearsHandlersMess.pas	Mon May 09 19:10:43 2022 +0300
@@ -7362,7 +7362,7 @@
         0);
 
     bullet^.Karma := 12;
-    bullet^.Pos := 1;
+    bullet^.Pos := 1; // To tell apart from minigun bullets
     bullet^.WDTimer := GameTicks;
     bullet^.PortalCounter := 1;
     bullet^.Elasticity := Sentry^.X;
--- a/hedgewars/uGearsUtils.pas	Tue Apr 26 14:35:21 2022 -0400
+++ b/hedgewars/uGearsUtils.pas	Mon May 09 19:10:43 2022 +0300
@@ -1407,7 +1407,7 @@
             or (not UpdateHitOrder(
                     Gear, 
                     Ammo^.WDTimer, 
-                    (Ammo^.Kind = gtMinigunBullet) and (Gear^.Pos <> 0)))) then
+                    (Ammo^.Kind = gtMinigunBullet) and (Ammo^.Pos <> 0)))) then
         continue;
 
     if ((Ammo^.Kind = gtFlame) or (Ammo^.Kind = gtBlowTorch)) and