hedgewars/uAI.pas
changeset 439 c336ed82e76d
parent 434 2c6ccce17f39
child 441 f2920f08ea5f
--- a/hedgewars/uAI.pas	Mon Feb 12 21:57:29 2007 +0000
+++ b/hedgewars/uAI.pas	Tue Feb 13 18:16:03 2007 +0000
@@ -79,7 +79,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);
@@ -269,7 +269,8 @@
 procedure StartThink(Me: PGear);
 var a: TAmmoType;
 begin
-if ((Me^.State and gstAttacking) <> 0) or isInMultiShoot then exit;
+if ((Me^.State and (gstAttacking or gstHHJumping or gstFalling or gstMoving)) <> 0)
+   or isInMultiShoot then exit;
 Me^.State:= Me^.State or gstHHThinking;
 Me^.Message:= 0;
 StopThinking:= false;