diff options
author | Justin Clark-Casey (justincc) | 2011-09-12 22:51:56 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-12 22:51:56 +0100 |
commit | 56cd7d96851203efa3e84b4c8be70177e2d2d453 (patch) | |
tree | 6bbd1840a82bd3885950ea138518f9ff99df0ac0 | |
parent | minor: if the script engine fails to find a prim for a script, also print out... (diff) | |
download | opensim-SC_OLD-56cd7d96851203efa3e84b4c8be70177e2d2d453.zip opensim-SC_OLD-56cd7d96851203efa3e84b4c8be70177e2d2d453.tar.gz opensim-SC_OLD-56cd7d96851203efa3e84b4c8be70177e2d2d453.tar.bz2 opensim-SC_OLD-56cd7d96851203efa3e84b4c8be70177e2d2d453.tar.xz |
stop the redundant passing in of RegionInfo to SceneGraph, since the Scene is always passed in at the same time.
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 |
3 files changed, 7 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f86b3b6..e0bc891 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -656,7 +656,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
656 | EventManager.OnLandObjectRemoved += | 656 | EventManager.OnLandObjectRemoved += |
657 | new EventManager.LandObjectRemoved(simDataService.RemoveLandObject); | 657 | new EventManager.LandObjectRemoved(simDataService.RemoveLandObject); |
658 | 658 | ||
659 | m_sceneGraph = new SceneGraph(this, m_regInfo); | 659 | m_sceneGraph = new SceneGraph(this); |
660 | 660 | ||
661 | // If the scene graph has an Unrecoverable error, restart this sim. | 661 | // If the scene graph has an Unrecoverable error, restart this sim. |
662 | // Currently the only thing that causes it to happen is two kinds of specific | 662 | // Currently the only thing that causes it to happen is two kinds of specific |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 89e6ddb..40dc2f8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -74,7 +74,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
74 | 74 | ||
75 | protected internal EntityManager Entities = new EntityManager(); | 75 | protected internal EntityManager Entities = new EntityManager(); |
76 | 76 | ||
77 | protected RegionInfo m_regInfo; | ||
78 | protected Scene m_parentScene; | 77 | protected Scene m_parentScene; |
79 | protected Dictionary<UUID, SceneObjectGroup> m_updateList = new Dictionary<UUID, SceneObjectGroup>(); | 78 | protected Dictionary<UUID, SceneObjectGroup> m_updateList = new Dictionary<UUID, SceneObjectGroup>(); |
80 | protected int m_numRootAgents = 0; | 79 | protected int m_numRootAgents = 0; |
@@ -108,10 +107,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
108 | 107 | ||
109 | #endregion | 108 | #endregion |
110 | 109 | ||
111 | protected internal SceneGraph(Scene parent, RegionInfo regInfo) | 110 | protected internal SceneGraph(Scene parent) |
112 | { | 111 | { |
113 | m_parentScene = parent; | 112 | m_parentScene = parent; |
114 | m_regInfo = regInfo; | ||
115 | } | 113 | } |
116 | 114 | ||
117 | public PhysicsScene PhysicsScene | 115 | public PhysicsScene PhysicsScene |
@@ -122,7 +120,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
122 | // If we're not doing the initial set | 120 | // If we're not doing the initial set |
123 | // Then we've got to remove the previous | 121 | // Then we've got to remove the previous |
124 | // event handler | 122 | // event handler |
125 | |||
126 | if (_PhyScene != null) | 123 | if (_PhyScene != null) |
127 | _PhyScene.OnPhysicsCrash -= physicsBasedCrash; | 124 | _PhyScene.OnPhysicsCrash -= physicsBasedCrash; |
128 | 125 | ||
@@ -593,7 +590,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
593 | ScenePresence newAvatar = null; | 590 | ScenePresence newAvatar = null; |
594 | 591 | ||
595 | // ScenePresence always defaults to child agent | 592 | // ScenePresence always defaults to child agent |
596 | newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance, type); | 593 | newAvatar = new ScenePresence(client, m_parentScene, appearance, type); |
597 | 594 | ||
598 | AddScenePresence(newAvatar); | 595 | AddScenePresence(newAvatar); |
599 | 596 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 86e1e11..9b8afe3 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -707,9 +707,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
707 | #endregion | 707 | #endregion |
708 | 708 | ||
709 | #region Constructor(s) | 709 | #region Constructor(s) |
710 | 710 | ||
711 | public ScenePresence( | 711 | public ScenePresence( |
712 | IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance, PresenceType type) | 712 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
713 | { | 713 | { |
714 | AttachmentsSyncLock = new Object(); | 714 | AttachmentsSyncLock = new Object(); |
715 | 715 | ||
@@ -718,14 +718,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
718 | m_animator = new ScenePresenceAnimator(this); | 718 | m_animator = new ScenePresenceAnimator(this); |
719 | PresenceType = type; | 719 | PresenceType = type; |
720 | m_DrawDistance = world.DefaultDrawDistance; | 720 | m_DrawDistance = world.DefaultDrawDistance; |
721 | m_rootRegionHandle = reginfo.RegionHandle; | 721 | m_rootRegionHandle = world.RegionInfo.RegionHandle; |
722 | m_controllingClient = client; | 722 | m_controllingClient = client; |
723 | m_firstname = m_controllingClient.FirstName; | 723 | m_firstname = m_controllingClient.FirstName; |
724 | m_lastname = m_controllingClient.LastName; | 724 | m_lastname = m_controllingClient.LastName; |
725 | m_name = String.Format("{0} {1}", m_firstname, m_lastname); | 725 | m_name = String.Format("{0} {1}", m_firstname, m_lastname); |
726 | m_scene = world; | 726 | m_scene = world; |
727 | m_uuid = client.AgentId; | 727 | m_uuid = client.AgentId; |
728 | m_regionInfo = reginfo; | 728 | m_regionInfo = world.RegionInfo; |
729 | m_localId = m_scene.AllocateLocalId(); | 729 | m_localId = m_scene.AllocateLocalId(); |
730 | 730 | ||
731 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid); | 731 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid); |