hedgewars/uAIAmmoTests.pas
changeset 15728 f2930fe1b6d0
parent 15724 0436ea41ece5
child 15750 cc8882e46784
--- a/hedgewars/uAIAmmoTests.pas	Wed Jul 08 18:51:18 2020 +0200
+++ b/hedgewars/uAIAmmoTests.pas	Wed Jul 08 19:11:00 2020 +0200
@@ -999,7 +999,8 @@
 x:= hwFloat2Float(Me^.X);
 y:= hwFloat2Float(Me^.Y);
 range:= Metric(trunc(x), trunc(y), Targ.Point.X, Targ.Point.Y);
-if ( range < MIN_RANGE ) or ( range > MAX_RANGE ) then
+// Range limits (laser sight can remove upper range limit)
+if (range < MIN_RANGE) or ((range > MAX_RANGE) and (not aiLaserSighting) and (Level >= 4))then
     exit(BadTurn);
 
 Vx:= (Targ.Point.X - x) * 1 / 1024;