hedgewars/uGearsHedgehog.pas
changeset 10818 f642a28cab0c
parent 10789 acbf69e2e5cf
child 10895 bce67defd804
equal deleted inserted replaced
10816:37410518628e 10818:f642a28cab0c
   220 bShowFinger:= false;
   220 bShowFinger:= false;
   221 CurWeapon:= GetCurAmmoEntry(Gear^.Hedgehog^);
   221 CurWeapon:= GetCurAmmoEntry(Gear^.Hedgehog^);
   222 with Gear^,
   222 with Gear^,
   223     Gear^.Hedgehog^ do
   223     Gear^.Hedgehog^ do
   224         begin
   224         begin
   225         if ((State and gstHHDriven) <> 0) and ((State and (gstAttacked or gstHHChooseTarget)) = 0) and (((State and gstMoving) = 0)
   225         if ((State and gstHHDriven) <> 0) and ((State and (gstAttacked or gstChooseTarget)) = 0) and (((State and gstMoving) = 0)
   226         or (Power > 0)
   226         or (Power > 0)
   227         or (CurAmmoType = amTeleport)
   227         or (CurAmmoType = amTeleport)
   228         or
   228         or
   229         // Allow attacks while moving on ammo with AltAttack
   229         // Allow attacks while moving on ammo with AltAttack
   230         ((CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0))
   230         ((CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0))
  1316     end
  1316     end
  1317 else
  1317 else
  1318     begin
  1318     begin
  1319     if Gear^.Timer = 0 then
  1319     if Gear^.Timer = 0 then
  1320         begin
  1320         begin
  1321         Gear^.State:= Gear^.State and (not (gstWait or gstLoser or gstWinner or gstAttacked or gstNotKickable or gstHHChooseTarget));
  1321         Gear^.State:= Gear^.State and (not (gstWait or gstLoser or gstWinner or gstAttacked or gstNotKickable or gstChooseTarget));
  1322         if Gear^.Hedgehog^.Effects[heFrozen] = 0 then Gear^.Active:= false;
  1322         if Gear^.Hedgehog^.Effects[heFrozen] = 0 then Gear^.Active:= false;
  1323         AddCI(Gear);
  1323         AddCI(Gear);
  1324         exit
  1324         exit
  1325         end
  1325         end
  1326     else dec(Gear^.Timer)
  1326     else dec(Gear^.Timer)