hedgewars/HHHandlers.inc
changeset 2223 e009fee03c96
parent 2221 ef52dae4130b
child 2238 1a0d26408324
--- 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;