OSDN Git Service

When server sends us height 0 in coarselocationuppdate, it means its between 1024...
authorLatif Khalifa <latifer@streamgrid.net>
Wed, 26 Aug 2009 08:34:52 +0000 (08:34 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Wed, 26 Aug 2009 08:34:52 +0000 (08:34 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@162 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/GUI/Consoles/ChatConsole.cs

index 5ee8f89..95b1db0 100644 (file)
@@ -210,10 +210,18 @@ namespace Radegast
                         Vector3 pos;\r
                         if (!existing.Contains(key) || !sim.AvatarPositions.TryGetValue(key,out pos))\r
                         {\r
-                            // not not here anymore\r
+                            // not here anymore\r
                             removed.Add(key);\r
                             continue;\r
                         }\r
+\r
+                        // CoarseLocationUpdate gives us hight of 0 when actual height is\r
+                        // between 1024-4096m. Hard code somewhere in the middle (2000m)\r
+                        if (pos.Z < 0.1)\r
+                        {\r
+                            pos.Z = 2000f;\r
+                        }\r
+\r
                         int d = (int)Vector3d.Distance(ToVector3D(sim, pos), mypos);\r
                         if (sim != client.Network.CurrentSim && d > MAX_DISTANCE)\r
                         {\r