hedgewars/uGears.pas
changeset 5482 c047e70c53f4
parent 5476 649d35cf95ff
child 5490 18c6049b5ae3
equal deleted inserted replaced
5481:d3b9c4263cb7 5482:c047e70c53f4
   912 
   912 
   913         if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then 
   913         if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then 
   914             CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked;
   914             CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked;
   915         if delay2 = 0 then
   915         if delay2 = 0 then
   916             begin
   916             begin
   917             if CurrentHedgehog^.Gear^.State and gstAttacked = 0 then SweepDirty;
   917             if (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.State and gstAttacked = 0) then SweepDirty;
   918             CheckNoDamage;
   918             CheckNoDamage;
   919             AliveCount:= 0; // shorter version of check for win to allow typical step activity to proceed
   919             AliveCount:= 0; // shorter version of check for win to allow typical step activity to proceed
   920             for i:= 0 to Pred(ClansCount) do
   920             for i:= 0 to Pred(ClansCount) do
   921                 if ClansArray[i]^.ClanHealth > 0 then inc(AliveCount);
   921                 if ClansArray[i]^.ClanHealth > 0 then inc(AliveCount);
   922             if (AliveCount <= 1) and ((GameFlags and gfOneClanMode) = 0) then
   922             if (AliveCount <= 1) and ((GameFlags and gfOneClanMode) = 0) then