aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/world
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.RegionServer/world')
-rw-r--r--OpenSim.RegionServer/world/World.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs
index 445df1d..e89f8f4 100644
--- a/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim.RegionServer/world/World.cs
@@ -561,11 +561,25 @@ namespace OpenSim.world
561 } 561 }
562 lock (Entities) 562 lock (Entities)
563 { 563 {
564 this.Entities.Add(agentClient.AgentID, newAvatar); 564 if (!Entities.ContainsKey(agentClient.AgentID))
565 {
566 this.Entities.Add(agentClient.AgentID, newAvatar);
567 }
568 else
569 {
570 Entities[agentClient.AgentID] = newAvatar;
571 }
565 } 572 }
566 lock (Avatars) 573 lock (Avatars)
567 { 574 {
568 this.Avatars.Add(agentClient.AgentID, newAvatar); 575 if (Avatars.ContainsKey(agentClient.AgentID))
576 {
577 Avatars[agentClient.AgentID] = newAvatar;
578 }
579 else
580 {
581 this.Avatars.Add(agentClient.AgentID, newAvatar);
582 }
569 } 583 }
570 } 584 }
571 catch (Exception e) 585 catch (Exception e)