Remove unneeded variable
authorunc0rr
Wed, 27 Jul 2011 11:38:00 +0400
changeset 5425 862c194a1a1c
parent 5422 0daf3d8e4b70
child 5429 0caa7519cbd1
Remove unneeded variable
hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Tue Jul 26 17:28:55 2011 +0400
+++ b/hedgewars/uAIMisc.pas	Wed Jul 27 11:38:00 2011 +0400
@@ -370,9 +370,7 @@
 
 function HHGo(Gear, AltGear: PGear; var GoInfo: TGoInfo): boolean;
 var pX, pY: LongInt;
-    bRes: boolean;
 begin
-bRes:= false;
 AltGear^:= Gear^;
 
 GoInfo.Ticks:= 0;
@@ -390,7 +388,7 @@
       begin
       Goinfo.FallPix:= 0;
       HHJump(AltGear, jmpLJump, GoInfo); // try ljump instead of fall with damage
-      exit(bRes)
+      exit(false)
       end;
    Gear^.Y:= Gear^.Y + Gear^.dY;
    if hwRound(Gear^.Y) > pY then inc(GoInfo.FallPix);
@@ -399,14 +397,13 @@
       inc(GoInfo.Ticks, 410);
       Gear^.State:= Gear^.State and not (gstMoving or gstHHJumping);
       Gear^.dY:= _0;
-      bRes:= true;
       HHJump(AltGear, jmpLJump, GoInfo); // try ljump instead of fall
-      exit(bRes)
+      exit(true)
       end;
    continue
    end;
    if (Gear^.Message and gmLeft  )<>0 then Gear^.dX:= -cLittle else
-   if (Gear^.Message and gmRight )<>0 then Gear^.dX:=  cLittle else exit(bRes);
+   if (Gear^.Message and gmRight )<>0 then Gear^.dX:=  cLittle else exit(false);
    if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then
       begin
       if not (TestCollisionXwithXYShift(Gear, _0, -6, hwSign(Gear^.dX))
@@ -462,7 +459,7 @@
    exit(true);
 until (pX = hwRound(Gear^.X)) and (pY = hwRound(Gear^.Y)) and ((Gear^.State and gstMoving) = 0);
 HHJump(AltGear, jmpHJump, GoInfo);
-HHGo:= bRes;
+HHGo:= false;
 end;
 
 function AIrndSign(num: LongInt): LongInt;