Fix minigun bullet impact image being drawn over hog sometimes
authoralfadur
Fri, 09 Mar 2018 19:48:15 +0100
changeset 13148 ec165591a1ee
parent 13147 7040506c831f
child 13149 22d8725be313
Fix minigun bullet impact image being drawn over hog sometimes
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Fri Mar 09 19:45:21 2018 +0100
+++ b/hedgewars/uGearsUtils.pas	Fri Mar 09 19:48:15 2018 +0100
@@ -1273,8 +1273,10 @@
     if (Gear^.State and gstNoDamage) = 0 then
         begin
 
-        if (Ammo^.Kind = gtDEagleShot) or (Ammo^.Kind = gtSniperRifleShot)
-        or (Ammo^.Kind = gtMinigunBullet) then
+        if (Gear^.Kind <> gtMinigun) and
+            ((Ammo^.Kind = gtDEagleShot)
+                or (Ammo^.Kind = gtSniperRifleShot)
+                or (Ammo^.Kind = gtMinigunBullet)) then
             begin
             VGear := AddVisualGear(t^.cX[i], t^.cY[i], vgtBulletHit);
             if VGear <> nil then