make minigun shove cumulative
authoralfadur
Sun, 21 Jun 2020 22:10:38 +0300
changeset 15625 1b044b47773b
parent 15624 adbd2bcf7159
child 15626 b0078df61a59
make minigun shove cumulative
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Sun Jun 21 03:17:57 2020 +0300
+++ b/hedgewars/uGearsUtils.pas	Sun Jun 21 22:10:38 2020 +0300
@@ -1462,8 +1462,16 @@
                 end
             else if ((Ammo^.Kind <> gtFlame) or (Gear^.Kind = gtHedgehog)) and (Power <> 0) then
                 begin
-                Gear^.dX:= Ammo^.dX * Power * _0_01;
-                Gear^.dY:= Ammo^.dY * Power * _0_01
+                if (Ammo^.Kind in [gtMinigunBullet]) then
+                    begin    
+                    Gear^.dX:= Gear^.dX + Ammo^.dX * Power * _0_01;
+                    Gear^.dY:= Gear^.dY + Ammo^.dY * Power * _0_01
+                    end 
+                else
+                    begin
+                    Gear^.dX:= Ammo^.dX * Power * _0_01;
+                    Gear^.dY:= Ammo^.dY * Power * _0_01
+                    end
                 end;
 
             if (not isZero(Gear^.dX)) or (not isZero(Gear^.dY)) then