From a59621910e7926c3c146c6e555dbb27a1d9e7e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 25 Feb 2013 15:25:16 +0100 Subject: [PATCH] avoid floating point operation with heli fly int coordinates --- OpenRA.Mods.RA/Air/HeliFly.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Air/HeliFly.cs b/OpenRA.Mods.RA/Air/HeliFly.cs index a77236df9a..b0962801dd 100755 --- a/OpenRA.Mods.RA/Air/HeliFly.cs +++ b/OpenRA.Mods.RA/Air/HeliFly.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA.Air } var dist = Dest - aircraft.PxPosition; - if (float2.WithinEpsilon(float2.Zero, dist.ToFloat2(), 2)) + if (Math.Abs(dist.X) < 2 && Math.Abs(dist.Y) < 2) { aircraft.SubPxPosition = Dest.ToPSubPos(); return NextActivity;