equal
deleted
inserted
replaced
650 if Abs(trunc(x) - Targ.X) + Abs(trunc(y) - Targ.Y) < 40 then |
650 if Abs(trunc(x) - Targ.X) + Abs(trunc(y) - Targ.Y) < 40 then |
651 exit(BadTurn); |
651 exit(BadTurn); |
652 |
652 |
653 dmg:= sqrt(sqr(Targ.X - x)+sqr(Targ.Y-y)); |
653 dmg:= sqrt(sqr(Targ.X - x)+sqr(Targ.Y-y)); |
654 t:= 1.5 / dmg; |
654 t:= 1.5 / dmg; |
655 dmg:= dmg * 0.025; // div 40 |
655 dmg:= dmg * 0.05; // div 40 |
656 Vx:= (Targ.X - x) * t; |
656 Vx:= (Targ.X - x) * t; |
657 Vy:= (Targ.Y - y) * t; |
657 Vy:= (Targ.Y - y) * t; |
658 ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); |
658 ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); |
659 d:= 0; |
659 d:= 0; |
660 |
660 |