mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
* Refactor: Separate out RemoveScenePresence and add into InnerScene to match existing AddScenePresence
This commit is contained in:
@@ -520,6 +520,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
Entities[client.AgentId] = newAvatar;
|
||||
}
|
||||
}
|
||||
|
||||
lock (ScenePresences)
|
||||
{
|
||||
if (ScenePresences.ContainsKey(client.AgentId))
|
||||
@@ -535,7 +536,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
return newAvatar;
|
||||
}
|
||||
|
||||
public void AddScenePresence(ScenePresence presence)
|
||||
/// <summary>
|
||||
/// Add a presence to the scene
|
||||
/// </summary>
|
||||
/// <param name="presence"></param>
|
||||
internal void AddScenePresence(ScenePresence presence)
|
||||
{
|
||||
bool child = presence.IsChildAgent;
|
||||
|
||||
@@ -563,6 +568,36 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
ScenePresences[presence.UUID] = presence;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove a presence from the scene
|
||||
/// </summary>
|
||||
internal void RemoveScenePresence(LLUUID agentID)
|
||||
{
|
||||
lock (Entities)
|
||||
{
|
||||
if (Entities.Remove(agentID))
|
||||
{
|
||||
//m_log.InfoFormat("[SCENE] Removed scene presence {0} from entities list", agentID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", agentID);
|
||||
}
|
||||
}
|
||||
|
||||
lock (ScenePresences)
|
||||
{
|
||||
if (ScenePresences.Remove(agentID))
|
||||
{
|
||||
//m_log.InfoFormat("[SCENE] Removed scene presence {0}", agentID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SwapRootChildAgent(bool direction_RC_CR_T_F)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user