hedgewars/uAI.pas
changeset 371 731ad6d27bd1
parent 370 c75410fe3133
child 375 18012da67681
--- a/hedgewars/uAI.pas	Sat Jan 27 14:06:29 2007 +0000
+++ b/hedgewars/uAI.pas	Sat Jan 27 14:18:33 2007 +0000
@@ -41,8 +41,8 @@
 
 procedure TestAmmos(var Actions: TActions; Me: PGear);
 var Time, BotLevel: Longword;
-    Angle, Power, Score, ExplX, ExplY, ExplR: integer;
-    i: integer;
+    Angle, Power, Score, ExplX, ExplY, ExplR: LongInt;
+    i: LongInt;
     a, aa: TAmmoType;
 begin
 BotLevel:= PHedgehog(Me^.Hedgehog)^.BotLevel;
@@ -67,7 +67,7 @@
               else if (Angle < 0) then AddAction(BestActions, aia_LookLeft, 0, 200, 0, 0);
               if (Ammoz[a].Ammo.Propz and ammoprop_NoCrosshair) = 0 then
                  begin
-                 Angle:= integer(Me^.Angle) - Abs(Angle);
+                 Angle:= LongInt(Me^.Angle) - Abs(Angle);
                  if Angle > 0 then
                     begin
                     AddAction(BestActions, aia_Up, aim_push, 500, 0, 0);
@@ -95,7 +95,7 @@
       
 var Actions: TActions;
     ticks, maxticks, steps, BotLevel: Longword;
-    BaseRate, Rate: integer;
+    BaseRate, Rate: LongInt;
     GoInfo: TGoInfo;
     CanGo: boolean;
     AltMe: TGear;
@@ -203,7 +203,7 @@
 
 procedure StartThink(Me: PGear);
 var a: TAmmoType;
-    tmp: integer;
+    tmp: LongInt;
 begin
 if ((Me^.State and gstAttacking) <> 0) or isInMultiShoot then exit;
 ThinkingHH:= Me;
@@ -231,7 +231,7 @@
 tmp:= random(2) + 1;
 Push(0, BestActions, Me^, tmp);
 Push(0, BestActions, Me^, tmp xor 3);
-BestActions.Score:= Low(integer);
+BestActions.Score:= Low(LongInt);
 
 Think(Me)
 end;