OSDN Git Service

WaitUntilPosition - fixed reverse logic on distance
authorDouglas R. Miles <logicmoo@gmail.com>
Thu, 31 May 2012 19:39:32 +0000 (12:39 -0700)
committerDouglas R. Miles <logicmoo@gmail.com>
Thu, 31 May 2012 19:39:32 +0000 (12:39 -0700)
Radegast/Core/StateManager.cs

index d3c9995..d31d7f5 100644 (file)
@@ -703,7 +703,7 @@ namespace Radegast
             while (until > DateTime.Now)\r
             {\r
                 double dist = Vector3d.Distance(client.Self.GlobalPosition, pos);\r
-                if (howClose <= dist) return dist;\r
+                if (howClose >= dist) return dist;\r
                 Thread.Sleep(250);\r
             }\r
             return Vector3d.Distance(client.Self.GlobalPosition, pos);\r