OSDN Git Service

Work around incompatibility with Opensim, thanks nephrael for the patch
authorLatif Khalifa <latifer@streamgrid.net>
Sat, 18 Jul 2009 22:29:19 +0000 (22:29 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Sat, 18 Jul 2009 22:29:19 +0000 (22:29 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@115 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/GUI/Consoles/ChatConsole.cs

index e66d9c1..a261856 100644 (file)
@@ -147,7 +147,7 @@ namespace Radegast
 \r
         void Grid_OnCoarseLocationUpdate(Simulator sim, List<UUID> newEntries, List<UUID> removedEntries)\r
         {\r
-            if (client.Network.CurrentSim.ID != sim.ID || !sim.AvatarPositions.ContainsKey(client.Self.AgentID))\r
+            if (client.Network.CurrentSim.ID != sim.ID)\r
             {\r
                 return;\r
             }\r
@@ -165,7 +165,10 @@ namespace Radegast
             lvwObjects.BeginUpdate();\r
             try\r
             {\r
-                Vector3 mypos = sim.AvatarPositions[client.Self.AgentID];\r
+                Vector3 mypos = sim.AvatarPositions.ContainsKey(client.Self.AgentID)\r
+                                    ? sim.AvatarPositions[client.Self.AgentID]\r
+                                    : client.Self.SimPosition;\r
+\r
                 List<UUID> existing = new List<UUID>();\r
                 List<UUID> removed = new List<UUID>();\r
 \r