hedgewars/uAIAmmoTests.pas
changeset 15638 5a949495ee29
parent 15637 250c778463f3
child 15639 e4abca26f215
equal deleted inserted replaced
15637:250c778463f3 15638:5a949495ee29
  1280         begin
  1280         begin
  1281         t:= step / d;
  1281         t:= step / d;
  1282         dx:= (Targ.Point.X - x) * t;
  1282         dx:= (Targ.Point.X - x) * t;
  1283         dy:= (Targ.Point.Y - y) * t;
  1283         dy:= (Targ.Point.Y - y) * t;
  1284 
  1284 
  1285         ap.Angle:= DxDy2AttackAnglef(dx, -dy)
  1285         ap.Angle:= DxDy2AttackAnglef(dx, -dy);
  1286         // Apply inaccuracy
  1286         // Apply inaccuracy
  1287         if (not cLaserSighting) then
  1287         if (not cLaserSighting) then
  1288             inc(ap.Angle, + AIrndSign(random((Level - 1) * 10)));
  1288             inc(ap.Angle, + AIrndSign(random((Level - 1) * 10)));
  1289         end;
  1289         end;
  1290 
  1290