allow attacks while moving on ammo with alt attack (parachute/rope/jetpack) - needs testing.
authornemo
Sun, 05 Jul 2009 13:25:02 +0000
changeset 2223 e009fee03c96
parent 2222 2e98698b76aa
child 2224 4f3e7bd31841
allow attacks while moving on ammo with alt attack (parachute/rope/jetpack) - needs testing.
hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc	Fri Jul 03 23:45:07 2009 +0000
+++ b/hedgewars/HHHandlers.inc	Sun Jul 05 13:25:02 2009 +0000
@@ -106,8 +106,11 @@
      PHedgehog(Gear^.Hedgehog)^ do
      begin
      if ((State and gstHHDriven) <> 0)and
-        ((State and (gstAttacked or gstHHChooseTarget)) = 0)and
-        (((State and gstMoving) = 0) or ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_AttackInMove) <> 0))and
+        ((State and (gstAttacked or gstHHChooseTarget)) = 0) and
+        (((State and gstMoving) = 0) or 
+            // Allow attacks while moving on ammo with AltAttack
+            ((CurAmmoGear <> nil) and ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0)) or 
+            ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_AltAttack) <> 0)) and
         ((TargetPoint.X <> NoPointX) or ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NeedTarget) = 0)) then
         begin
         State:= State or gstAttacking;