aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
authorJohan Berntsson2008-03-04 05:31:54 +0000
committerJohan Berntsson2008-03-04 05:31:54 +0000
commit279e0061c515ee0a03036bef68eea9738273d785 (patch)
tree4502228eb7b87a760e0b0e67aded9d1d870d0bed /OpenSim/Region/Environment/Scenes/InnerScene.cs
parentAdded copyright heaaders. Minor cleanup. (diff)
downloadopensim-SC-279e0061c515ee0a03036bef68eea9738273d785.zip
opensim-SC-279e0061c515ee0a03036bef68eea9738273d785.tar.gz
opensim-SC-279e0061c515ee0a03036bef68eea9738273d785.tar.bz2
opensim-SC-279e0061c515ee0a03036bef68eea9738273d785.tar.xz
Merged 3Di code that provides scene and avatar serialization, and plugin support for region move/split/merge. See ThirdParty/3Di/README.txt. Unless the new modules are used there should be no noticeable changes when running OpenSim.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-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)