# HG changeset patch # User nemo # Date 1312733213 14400 # Node ID 79dd457193e650625f7f0aaef4bae87ac3208cc6 # Parent 13a222b00a9da529d3e69aee2086083ccdb82f7f make a special case for teleport instead. also allows teleporting off of a parachute diff -r 13a222b00a9d -r 79dd457193e6 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Sun Aug 07 11:52:06 2011 -0400 +++ b/hedgewars/HHHandlers.inc Sun Aug 07 12:06:53 2011 -0400 @@ -182,6 +182,7 @@ if ((State and gstHHDriven) <> 0)and ((State and (gstAttacked or gstHHChooseTarget)) = 0) and (((State and gstMoving) = 0) or + (CurAmmoType = amTeleport) or // Allow attacks while moving on ammo with AltAttack ((CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0)) or ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackInMove) <> 0)) and diff -r 13a222b00a9d -r 79dd457193e6 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Aug 07 11:52:06 2011 -0400 +++ b/hedgewars/uGears.pas Sun Aug 07 12:06:53 2011 -0400 @@ -917,12 +917,11 @@ if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and not CurrentHedgehog^.Unplaced then begin - if (CurrentHedgehog^.Gear^.State and (gstAttacked or gstMoving) = gstAttacked) and (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0) then + if (CurrentHedgehog^.Gear^.State and gstAttacked <> 0) and (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0) then begin CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State or gstHHChooseTarget; isCursorVisible := true end; - if (CurrentHedgehog^.Gear^.State and gstMoving = 0) or (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget = 0) then CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked; end; if delay2 = 0 then