hedgewars/uAI.pas
changeset 8677 afb2b467f801
parent 8036 89740f927254
child 8833 c13ebed437cb
child 8865 dd4035ee0f12
equal deleted inserted replaced
8676:c00f1df47cef 8677:afb2b467f801
   412             Walk(@WalkMe, Actions);
   412             Walk(@WalkMe, Actions);
   413 
   413 
   414             // find another hog in team
   414             // find another hog in team
   415             repeat
   415             repeat
   416                 itHedgehog:= Succ(itHedgehog) mod CurrentTeam^.HedgehogsNumber;
   416                 itHedgehog:= Succ(itHedgehog) mod CurrentTeam^.HedgehogsNumber;
   417             until (itHedgehog = currHedgehogIndex) or (CurrentTeam^.Hedgehogs[itHedgehog].Gear <> nil);
   417             until (itHedgehog = currHedgehogIndex) or ((CurrentTeam^.Hedgehogs[itHedgehog].Gear <> nil) and (CurrentTeam^.Hedgehogs[itHedgehog].Effects[heFrozen]=0));
   418 
   418 
   419 
   419 
   420             inc(switchesNum);
   420             inc(switchesNum);
   421         until (not (switchImmediatelyAvailable or (switchCount > 0)))
   421         until (not (switchImmediatelyAvailable or (switchCount > 0)))
   422             or StopThinking 
   422             or StopThinking