hedgewars/uAI.pas
changeset 15703 a92220611821
parent 15659 fd1a580a35d6
child 15708 034955e721a1
equal deleted inserted replaced
15702:3224d0d970ac 15703:a92220611821
   291     TestAmmos(Actions, Me, false);
   291     TestAmmos(Actions, Me, false);
   292 
   292 
   293 BestRate:= RatePlace(Me);
   293 BestRate:= RatePlace(Me);
   294 BaseRate:= Max(BestRate, 0);
   294 BaseRate:= Max(BestRate, 0);
   295 
   295 
   296 // switch to 'skip' if we cannot move because of mouse cursor being shown
   296 // unselect weapon if we cannot move because of mouse cursor being shown
   297 if (Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0 then
   297 if (Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0 then
   298     AddAction(Actions, aia_Weapon, Longword(amSkip), 100 + random(200), 0, 0);
   298     AddAction(Actions, aia_Weapon, Longword(amNothing), 100 + random(200), 0, 0);
   299 
   299 
   300 if ((CurrentHedgehog^.MultiShootAttacks = 0) or ((Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NoMoveAfter) = 0))
   300 if ((CurrentHedgehog^.MultiShootAttacks = 0) or ((Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NoMoveAfter) = 0))
   301     and (CurrentHedgehog^.Effects[heArtillery] = 0) and (cGravityf <> 0) then
   301     and (CurrentHedgehog^.Effects[heArtillery] = 0) and (cGravityf <> 0) then
   302     begin
   302     begin
   303     tmp:= random(2) + 1;
   303     tmp:= random(2) + 1;