equal
deleted
inserted
replaced
610 |
610 |
611 x:= hwFloat2Float(Me^.X); |
611 x:= hwFloat2Float(Me^.X); |
612 y:= hwFloat2Float(Me^.Y); |
612 y:= hwFloat2Float(Me^.Y); |
613 |
613 |
614 if Abs(trunc(x) - Targ.X) + Abs(trunc(y) - Targ.Y) < 40 then |
614 if Abs(trunc(x) - Targ.X) + Abs(trunc(y) - Targ.Y) < 40 then |
615 begin |
|
616 TestDesertEagle:= BadTurn; |
|
617 exit(BadTurn); |
615 exit(BadTurn); |
618 end; |
|
619 |
616 |
620 t:= 2 / sqrt(sqr(Targ.X - x)+sqr(Targ.Y-y)); |
617 t:= 2 / sqrt(sqr(Targ.X - x)+sqr(Targ.Y-y)); |
621 Vx:= (Targ.X - x) * t; |
618 Vx:= (Targ.X - x) * t; |
622 Vy:= (Targ.Y - y) * t; |
619 Vy:= (Targ.Y - y) * t; |
623 ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); |
620 ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); |