Fix firepunch direction when attacking from high jump
authorunc0rr
Mon, 09 Jun 2008 14:57:54 +0000
changeset 979 edb8f208c1d9
parent 978 4d4f290d05c5
child 980 20128e98988b
Fix firepunch direction when attacking from high jump
hedgewars/GSHandlers.inc
hedgewars/HHHandlers.inc
--- a/hedgewars/GSHandlers.inc	Mon Jun 09 14:20:16 2008 +0000
+++ b/hedgewars/GSHandlers.inc	Mon Jun 09 14:57:54 2008 +0000
@@ -1089,7 +1089,7 @@
 HHGear^.dY:= - _0_3;
 
 Gear^.X:= HHGear^.X;
-Gear^.dX:= SignAs(_0_45, HHGear^.dX);
+Gear^.dX:= SignAs(_0_45, Gear^.dX);
 Gear^.dY:= - _0_9;
 Gear^.doStep:= @doStepFirePunchWork;
 DrawTunnel(HHGear^.X - int2hwFloat(cHHRadius), HHGear^.Y + _1, _0_5, _0, cHHRadius * 4, 5);
--- a/hedgewars/HHHandlers.inc	Mon Jun 09 14:20:16 2008 +0000
+++ b/hedgewars/HHHandlers.inc	Mon Jun 09 14:57:54 2008 +0000
@@ -147,7 +147,7 @@
                                  end;
                        amDEagle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0);
                      amDynamite: AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000);
-                    amFirePunch: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtFirePunch, 0, _0, _0, 0);
+                    amFirePunch: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtFirePunch, 0, xx, _0, 0);
                          amWhip: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtWhip, 0, SignAs(_1, dX), - _0_8, 0);
                   amBaseballBat: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtShover, 0, xx * _0_5, yy * _0_5, 0);
                     amParachute: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtParachute, 0, _0, _0, 0);