hedgewars/uGears.pas
changeset 5513 79dd457193e6
parent 5511 13a222b00a9d
child 5525 5fb06333314e
equal deleted inserted replaced
5511:13a222b00a9d 5513:79dd457193e6
   915         begin
   915         begin
   916         dec(delay2);
   916         dec(delay2);
   917 
   917 
   918         if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and not CurrentHedgehog^.Unplaced then
   918         if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and not CurrentHedgehog^.Unplaced then
   919             begin
   919             begin
   920             if (CurrentHedgehog^.Gear^.State and (gstAttacked or gstMoving) = gstAttacked) and (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0) then
   920             if (CurrentHedgehog^.Gear^.State and gstAttacked <> 0) and (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0) then
   921                 begin
   921                 begin
   922                 CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State or gstHHChooseTarget;
   922                 CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State or gstHHChooseTarget;
   923                 isCursorVisible := true
   923                 isCursorVisible := true
   924                 end;
   924                 end;
   925             if (CurrentHedgehog^.Gear^.State and gstMoving = 0) or (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget = 0) then
       
   926             CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked;
   925             CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked;
   927             end;
   926             end;
   928         if delay2 = 0 then
   927         if delay2 = 0 then
   929             begin
   928             begin
   930             if (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.State and gstAttacked = 0) then SweepDirty;
   929             if (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.State and gstAttacked = 0) then SweepDirty;