skip frozen hogs in switch
authornemo
Wed, 06 Mar 2013 13:03:11 -0500
changeset 8677 afb2b467f801
parent 8676 c00f1df47cef
child 8678 fb62d23c70f8
skip frozen hogs in switch
hedgewars/uAI.pas
--- a/hedgewars/uAI.pas	Wed Mar 06 12:55:48 2013 -0500
+++ b/hedgewars/uAI.pas	Wed Mar 06 13:03:11 2013 -0500
@@ -414,7 +414,7 @@
             // find another hog in team
             repeat
                 itHedgehog:= Succ(itHedgehog) mod CurrentTeam^.HedgehogsNumber;
-            until (itHedgehog = currHedgehogIndex) or (CurrentTeam^.Hedgehogs[itHedgehog].Gear <> nil);
+            until (itHedgehog = currHedgehogIndex) or ((CurrentTeam^.Hedgehogs[itHedgehog].Gear <> nil) and (CurrentTeam^.Hedgehogs[itHedgehog].Effects[heFrozen]=0));
 
 
             inc(switchesNum);