poor AI thought he should avoid stepping on frozen crates, and jump for non-frozen ones
authornemo
Sun, 23 Jun 2013 13:35:26 -0400
changeset 9247 68bbe56badcc
parent 9245 1dfdf35dd35d
child 9249 7b8c82785145
poor AI thought he should avoid stepping on frozen crates, and jump for non-frozen ones
hedgewars/uCollisions.pas
--- a/hedgewars/uCollisions.pas	Fri Jun 21 12:26:55 2013 -0400
+++ b/hedgewars/uCollisions.pas	Sun Jun 23 13:35:26 2013 -0400
@@ -83,7 +83,7 @@
     X:= hwRound(Gear^.X);
     Y:= hwRound(Gear^.Y);
     Radius:= Gear^.Radius;
-    ChangeRoundInLand(X, Y, Radius - 1, true, (Gear = CurrentHedgehog^.Gear) or ((Gear^.Kind = gtCase) and (Gear^.State and gstFrozen <> 0)));
+    ChangeRoundInLand(X, Y, Radius - 1, true, (Gear = CurrentHedgehog^.Gear) or ((Gear^.Kind = gtCase) and (Gear^.State and gstFrozen = 0)));
     cGear:= Gear
     end;
 Gear^.CollisionIndex:= Count;
@@ -104,7 +104,7 @@
 if Gear^.CollisionIndex >= 0 then
     begin
     with cinfos[Gear^.CollisionIndex] do
-        ChangeRoundInLand(X, Y, Radius - 1, false, (Gear = CurrentHedgehog^.Gear) or ((Gear^.Kind = gtCase) and (Gear^.State and gstFrozen <> 0)));
+        ChangeRoundInLand(X, Y, Radius - 1, false, (Gear = CurrentHedgehog^.Gear) or ((Gear^.Kind = gtCase) and (Gear^.State and gstFrozen = 0)));
     cinfos[Gear^.CollisionIndex]:= cinfos[Pred(Count)];
     cinfos[Gear^.CollisionIndex].cGear^.CollisionIndex:= Gear^.CollisionIndex;
     Gear^.CollisionIndex:= -1;