hedgewars/uAI.pas
changeset 15603 ac44dae6425e
parent 15602 583080b0272b
child 15632 25132742a948
equal deleted inserted replaced
15602:583080b0272b 15603:ac44dae6425e
   165                             end;
   165                             end;
   166                         end;
   166                         end;
   167 
   167 
   168                     AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);
   168                     AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);
   169 
   169 
   170                     if (Ammoz[a].Ammo.Propz and ammoprop_NeedTarget) <> 0 then
       
   171                         begin
       
   172                         AddAction(BestActions, aia_Put, 0, 8, ap.AttackPutX, ap.AttackPutY)
       
   173                         end;
       
   174 
       
   175                     if (ap.Angle > 0) then
   170                     if (ap.Angle > 0) then
   176                         AddAction(BestActions, aia_LookRight, 0, 200, 0, 0)
   171                         AddAction(BestActions, aia_LookRight, 0, 200, 0, 0)
   177                     else if (ap.Angle < 0) then
   172                     else if (ap.Angle < 0) then
   178                         AddAction(BestActions, aia_LookLeft, 0, 200, 0, 0);
   173                         AddAction(BestActions, aia_LookLeft, 0, 200, 0, 0);
   179 
   174 
   183                     if ((Ammoz[a].Ammo.Propz and ammoprop_SetBounce) > 0) and (ap.Bounce > 0) then
   178                     if ((Ammoz[a].Ammo.Propz and ammoprop_SetBounce) > 0) and (ap.Bounce > 0) then
   184                         begin
   179                         begin
   185                         AddAction(BestActions, aia_Precise, aim_push, 10, 0, 0);
   180                         AddAction(BestActions, aia_Precise, aim_push, 10, 0, 0);
   186                         AddAction(BestActions, aia_Timer, ap.Bounce, 200, 0, 0);
   181                         AddAction(BestActions, aia_Timer, ap.Bounce, 200, 0, 0);
   187                         AddAction(BestActions, aia_Precise, aim_release, 10, 0, 0);
   182                         AddAction(BestActions, aia_Precise, aim_release, 10, 0, 0);
       
   183                         end;
       
   184 
       
   185                     if (Ammoz[a].Ammo.Propz and ammoprop_NeedTarget) <> 0 then
       
   186                         begin
       
   187                         AddAction(BestActions, aia_Put, 0, 8, ap.AttackPutX, ap.AttackPutY)
   188                         end;
   188                         end;
   189 
   189 
   190                     if (Ammoz[a].Ammo.Propz and ammoprop_NoCrosshair) = 0 then
   190                     if (Ammoz[a].Ammo.Propz and ammoprop_NoCrosshair) = 0 then
   191                         begin
   191                         begin
   192                         dAngle:= LongInt(Me^.Angle) - Abs(ap.Angle);
   192                         dAngle:= LongInt(Me^.Angle) - Abs(ap.Angle);