From 40dd7583dcfe7e32f0c223903a389407b69e1d32 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 26 Aug 2009 08:34:52 +0000 Subject: [PATCH] When server sends us height 0 in coarselocationuppdate, it means its between 1024-4096, we hardcode 2000, better than 0. git-svn-id: https://radegast.googlecode.com/svn/trunk@162 f7a694da-4d33-11de-9ad6-1127a62b9fcd --- Radegast/GUI/Consoles/ChatConsole.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Radegast/GUI/Consoles/ChatConsole.cs b/Radegast/GUI/Consoles/ChatConsole.cs index 5ee8f89..95b1db0 100644 --- a/Radegast/GUI/Consoles/ChatConsole.cs +++ b/Radegast/GUI/Consoles/ChatConsole.cs @@ -210,10 +210,18 @@ namespace Radegast Vector3 pos; if (!existing.Contains(key) || !sim.AvatarPositions.TryGetValue(key,out pos)) { - // not not here anymore + // not here anymore removed.Add(key); continue; } + + // CoarseLocationUpdate gives us hight of 0 when actual height is + // between 1024-4096m. Hard code somewhere in the middle (2000m) + if (pos.Z < 0.1) + { + pos.Z = 2000f; + } + int d = (int)Vector3d.Distance(ToVector3D(sim, pos), mypos); if (sim != client.Network.CurrentSim && d > MAX_DISTANCE) { -- 2.11.0