don't use currenthedgehog
authornemo
Sun, 26 Feb 2012 18:13:26 -0500
changeset 6748 9d8763deee42
parent 6747 3f85b103f29f
child 6749 6bb0cea803bd
don't use currenthedgehog
hedgewars/uAI.pas
--- a/hedgewars/uAI.pas	Sun Feb 26 16:31:25 2012 -0500
+++ b/hedgewars/uAI.pas	Sun Feb 26 18:13:26 2012 -0500
@@ -118,7 +118,7 @@
 for i:= 0 to Pred(Targets.Count) do
     if (Targets.ar[i].Score >= 0) and (not StopThinking) then
         begin
-        with CurrentHedgehog^ do
+        with Me^.Hedgehog^ do
             a:= CurAmmoType;
         aa:= a;
 {$IFDEF USE_SDLTHREADS}
@@ -334,6 +334,7 @@
                 itHedgehog:= Succ(itHedgehog) mod CurrentTeam^.HedgehogsNumber;
             until (itHedgehog = currHedgehogIndex) or (CurrentTeam^.Hedgehogs[itHedgehog].Gear <> nil);
 
+
             inc(switchesNum);
         until (not (switchImmediatelyAvailable or switchAvailable))
             or StopThinking