equal
deleted
inserted
replaced
2476 |
2476 |
2477 Vx:= (Targ.Point.X - x) * 1 / 1024; |
2477 Vx:= (Targ.Point.X - x) * 1 / 1024; |
2478 Vy:= (Targ.Point.Y - y) * 1 / 1024; |
2478 Vy:= (Targ.Point.Y - y) * 1 / 1024; |
2479 ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); |
2479 ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); |
2480 // Minigun angle is limited |
2480 // Minigun angle is limited |
2481 if (ap.Angle < Ammoz[amMinigun].minAngle) or (ap.Angle > Ammoz[amMinigun].maxAngle) then |
2481 if (abs(ap.Angle) < Ammoz[amMinigun].minAngle) or (abs(ap.Angle) > Ammoz[amMinigun].maxAngle) then |
2482 exit(BadTurn); |
2482 exit(BadTurn); |
2483 |
2483 |
2484 // Apply inaccuracy |
2484 // Apply inaccuracy |
2485 if (not aiLaserSighting) then |
2485 if (not aiLaserSighting) then |
2486 inc(ap.Angle, AIrndSign(random((Level - 1) * 10))); |
2486 inc(ap.Angle, AIrndSign(random((Level - 1) * 10))); |