hedgewars/uAI.pas
changeset 15739 94f4d0a96143
parent 15707 26c6e5325075
child 15740 0a172cfe8840
equal deleted inserted replaced
15738:027a56b3895e 15739:94f4d0a96143
   197                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   197                             AddAction(BestActions, aia_attack, aim_push, 10, 0, 0);
   198                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   198                             AddAction(BestActions, aia_attack, aim_release, 10, 0, 0);
   199                             end;
   199                             end;
   200                         end;
   200                         end;
   201 
   201 
   202                     AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);
       
   203 
       
   204                     if (ap.Angle > 0) then
   202                     if (ap.Angle > 0) then
   205                         AddAction(BestActions, aia_LookRight, 0, 200, 0, 0)
   203                         AddAction(BestActions, aia_LookRight, 0, 200, 0, 0)
   206                     else if (ap.Angle < 0) then
   204                     else if (ap.Angle < 0) then
   207                         AddAction(BestActions, aia_LookLeft, 0, 200, 0, 0);
   205                         AddAction(BestActions, aia_LookLeft, 0, 200, 0, 0);
       
   206 
       
   207                     AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);
   208 
   208 
   209                     if (Ammoz[a].Ammo.Propz and ammoprop_Timerable) <> 0 then
   209                     if (Ammoz[a].Ammo.Propz and ammoprop_Timerable) <> 0 then
   210                         AddAction(BestActions, aia_Timer, ap.Time div 1000, 400, 0, 0);
   210                         AddAction(BestActions, aia_Timer, ap.Time div 1000, 400, 0, 0);
   211 
   211 
   212                     if ((Ammoz[a].Ammo.Propz and ammoprop_SetBounce) > 0) and (ap.Bounce > 0) then
   212                     if ((Ammoz[a].Ammo.Propz and ammoprop_SetBounce) > 0) and (ap.Bounce > 0) then