hedgewars/uAIActions.pas
changeset 7416 2f2f78fc65a3
parent 7197 5a9775b97c7e
child 7433 c7fff3e61d49
equal deleted inserted replaced
7414:a9f18c66ce34 7416:2f2f78fc65a3
    42     aia_LJump      = $8007;
    42     aia_LJump      = $8007;
    43     aia_Skip       = $8008;
    43     aia_Skip       = $8008;
    44     aia_Wait       = $8009;
    44     aia_Wait       = $8009;
    45     aia_Put        = $800A;
    45     aia_Put        = $800A;
    46     aia_waitAngle  = $800B;
    46     aia_waitAngle  = $800B;
       
    47     aia_waitAmmoXY = $800C;
    47     
    48     
    48     aim_push       = $8000;
    49     aim_push       = $8000;
    49     aim_release    = $8001;
    50     aim_release    = $8001;
    50     ai_specmask    = $8000;
    51     ai_specmask    = $8000;
    51 
    52 
   232             aia_Put:
   233             aia_Put:
   233                 doPut(X, Y, true);
   234                 doPut(X, Y, true);
   234                 
   235                 
   235             aia_waitAngle:
   236             aia_waitAngle:
   236                 if Me^.Angle <> Abs(Param) then exit;
   237                 if Me^.Angle <> Abs(Param) then exit;
       
   238 
       
   239             aia_waitAmmoXY:
       
   240                 if (CurAmmoGear <> nil) and ((hwRound(CurAmmoGear^.X) <> X) or (hwRound(CurAmmoGear^.Y) <> Y)) then exit;
       
   241 
   237             end
   242             end
   238         else
   243         else
   239             begin
   244             begin
   240             s:= ActionIdToStr[Action];
   245             s:= ActionIdToStr[Action];
   241             if (Param and ai_specmask) <> 0 then
   246             if (Param and ai_specmask) <> 0 then