aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 860f5fb..882e589 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -57,6 +57,7 @@ namespace OpenSim.Region.Environment.Scenes
57 // SceneObjects is not currently populated or used. 57 // SceneObjects is not currently populated or used.
58 //public Dictionary<LLUUID, SceneObjectGroup> SceneObjects; 58 //public Dictionary<LLUUID, SceneObjectGroup> SceneObjects;
59 public Dictionary<LLUUID, EntityBase> Entities; 59 public Dictionary<LLUUID, EntityBase> Entities;
60 public Dictionary<LLUUID, ScenePresence> RestorePresences;
60 61
61 public BasicQuadTreeNode QuadTree; 62 public BasicQuadTreeNode QuadTree;
62 63
@@ -455,6 +456,48 @@ namespace OpenSim.Region.Environment.Scenes
455 return newAvatar; 456 return newAvatar;
456 } 457 }
457 458
459 public void AddScenePresence(ScenePresence presence)
460 {
461 bool child = presence.IsChildAgent;
462
463 if (child)
464 {
465 m_numChildAgents++;
466 m_log.Info("[SCENE]"+ m_regInfo.RegionName + ": Creating new child agent.");
467 }
468 else
469 {
470 m_numRootAgents++;
471 m_log.Info("[SCENE] "+ m_regInfo.RegionName + ": Creating new root agent.");
472 m_log.Info("[SCENE] "+ m_regInfo.RegionName + ": Adding Physical agent.");
473
474 presence.AddToPhysicalScene();
475 }
476
477 lock (Entities)
478 {
479 if (!Entities.ContainsKey(presence.m_uuid))
480 {
481 Entities.Add(presence.m_uuid, presence);
482 }
483 else
484 {
485 Entities[presence.m_uuid] = presence;
486 }
487 }
488 lock (ScenePresences)
489 {
490 if (ScenePresences.ContainsKey(presence.m_uuid))
491 {
492 ScenePresences[presence.m_uuid] = presence;
493 }
494 else
495 {
496 ScenePresences.Add(presence.m_uuid, presence);
497 }
498 }
499 }
500
458 public void SwapRootChildAgent(bool direction_RC_CR_T_F) 501 public void SwapRootChildAgent(bool direction_RC_CR_T_F)
459 { 502 {
460 if (direction_RC_CR_T_F) 503 if (direction_RC_CR_T_F)