Added some sanity checks to AddViewerAgent to prevent duplicate addition (now attempts update).
parent
20b4ecbec1
commit
7659d67fdb
|
@ -561,11 +561,25 @@ namespace OpenSim.world
|
||||||
}
|
}
|
||||||
lock (Entities)
|
lock (Entities)
|
||||||
{
|
{
|
||||||
this.Entities.Add(agentClient.AgentID, newAvatar);
|
if (!Entities.ContainsKey(agentClient.AgentID))
|
||||||
|
{
|
||||||
|
this.Entities.Add(agentClient.AgentID, newAvatar);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Entities[agentClient.AgentID] = newAvatar;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
lock (Avatars)
|
lock (Avatars)
|
||||||
{
|
{
|
||||||
this.Avatars.Add(agentClient.AgentID, newAvatar);
|
if (Avatars.ContainsKey(agentClient.AgentID))
|
||||||
|
{
|
||||||
|
Avatars[agentClient.AgentID] = newAvatar;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Avatars.Add(agentClient.AgentID, newAvatar);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
Loading…
Reference in New Issue