aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-26 00:38:04 +0000
committerJustin Clarke Casey2008-05-26 00:38:04 +0000
commit73a28a56daf03e84f5a460317222b3e7e5d2e514 (patch)
treea589a505ce9ef6d182aeb73bb8933c35af7f77d4 /OpenSim/Region/Environment/Scenes/InnerScene.cs
parentUpdate svn properties. Formatting cleanup. (diff)
downloadopensim-SC-73a28a56daf03e84f5a460317222b3e7e5d2e514.zip
opensim-SC-73a28a56daf03e84f5a460317222b3e7e5d2e514.tar.gz
opensim-SC-73a28a56daf03e84f5a460317222b3e7e5d2e514.tar.bz2
opensim-SC-73a28a56daf03e84f5a460317222b3e7e5d2e514.tar.xz
* Refactor: Separate out RemoveScenePresence and add into InnerScene to match existing AddScenePresence
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs37
1 files changed, 36 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 0405bdf..a2fdf66 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -520,6 +520,7 @@ namespace OpenSim.Region.Environment.Scenes
520 Entities[client.AgentId] = newAvatar; 520 Entities[client.AgentId] = newAvatar;
521 } 521 }
522 } 522 }
523
523 lock (ScenePresences) 524 lock (ScenePresences)
524 { 525 {
525 if (ScenePresences.ContainsKey(client.AgentId)) 526 if (ScenePresences.ContainsKey(client.AgentId))
@@ -535,7 +536,11 @@ namespace OpenSim.Region.Environment.Scenes
535 return newAvatar; 536 return newAvatar;
536 } 537 }
537 538
538 public void AddScenePresence(ScenePresence presence) 539 /// <summary>
540 /// Add a presence to the scene
541 /// </summary>
542 /// <param name="presence"></param>
543 internal void AddScenePresence(ScenePresence presence)
539 { 544 {
540 bool child = presence.IsChildAgent; 545 bool child = presence.IsChildAgent;
541 546
@@ -563,6 +568,36 @@ namespace OpenSim.Region.Environment.Scenes
563 ScenePresences[presence.UUID] = presence; 568 ScenePresences[presence.UUID] = presence;
564 } 569 }
565 } 570 }
571
572 /// <summary>
573 /// Remove a presence from the scene
574 /// </summary>
575 internal void RemoveScenePresence(LLUUID agentID)
576 {
577 lock (Entities)
578 {
579 if (Entities.Remove(agentID))
580 {
581 //m_log.InfoFormat("[SCENE] Removed scene presence {0} from entities list", agentID);
582 }
583 else
584 {
585 m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", agentID);
586 }
587 }
588
589 lock (ScenePresences)
590 {
591 if (ScenePresences.Remove(agentID))
592 {
593 //m_log.InfoFormat("[SCENE] Removed scene presence {0}", agentID);
594 }
595 else
596 {
597 m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
598 }
599 }
600 }
566 601
567 public void SwapRootChildAgent(bool direction_RC_CR_T_F) 602 public void SwapRootChildAgent(bool direction_RC_CR_T_F)
568 { 603 {