stop the redundant passing in of RegionInfo to SceneGraph, since the Scene is always passed in at the same time.
parent
00f8946bd4
commit
56cd7d9685
|
@ -656,7 +656,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
EventManager.OnLandObjectRemoved +=
|
EventManager.OnLandObjectRemoved +=
|
||||||
new EventManager.LandObjectRemoved(simDataService.RemoveLandObject);
|
new EventManager.LandObjectRemoved(simDataService.RemoveLandObject);
|
||||||
|
|
||||||
m_sceneGraph = new SceneGraph(this, m_regInfo);
|
m_sceneGraph = new SceneGraph(this);
|
||||||
|
|
||||||
// If the scene graph has an Unrecoverable error, restart this sim.
|
// If the scene graph has an Unrecoverable error, restart this sim.
|
||||||
// Currently the only thing that causes it to happen is two kinds of specific
|
// Currently the only thing that causes it to happen is two kinds of specific
|
||||||
|
|
|
@ -74,7 +74,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
protected internal EntityManager Entities = new EntityManager();
|
protected internal EntityManager Entities = new EntityManager();
|
||||||
|
|
||||||
protected RegionInfo m_regInfo;
|
|
||||||
protected Scene m_parentScene;
|
protected Scene m_parentScene;
|
||||||
protected Dictionary<UUID, SceneObjectGroup> m_updateList = new Dictionary<UUID, SceneObjectGroup>();
|
protected Dictionary<UUID, SceneObjectGroup> m_updateList = new Dictionary<UUID, SceneObjectGroup>();
|
||||||
protected int m_numRootAgents = 0;
|
protected int m_numRootAgents = 0;
|
||||||
|
@ -108,10 +107,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected internal SceneGraph(Scene parent, RegionInfo regInfo)
|
protected internal SceneGraph(Scene parent)
|
||||||
{
|
{
|
||||||
m_parentScene = parent;
|
m_parentScene = parent;
|
||||||
m_regInfo = regInfo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PhysicsScene PhysicsScene
|
public PhysicsScene PhysicsScene
|
||||||
|
@ -122,7 +120,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// If we're not doing the initial set
|
// If we're not doing the initial set
|
||||||
// Then we've got to remove the previous
|
// Then we've got to remove the previous
|
||||||
// event handler
|
// event handler
|
||||||
|
|
||||||
if (_PhyScene != null)
|
if (_PhyScene != null)
|
||||||
_PhyScene.OnPhysicsCrash -= physicsBasedCrash;
|
_PhyScene.OnPhysicsCrash -= physicsBasedCrash;
|
||||||
|
|
||||||
|
@ -593,7 +590,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScenePresence newAvatar = null;
|
ScenePresence newAvatar = null;
|
||||||
|
|
||||||
// ScenePresence always defaults to child agent
|
// ScenePresence always defaults to child agent
|
||||||
newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance, type);
|
newAvatar = new ScenePresence(client, m_parentScene, appearance, type);
|
||||||
|
|
||||||
AddScenePresence(newAvatar);
|
AddScenePresence(newAvatar);
|
||||||
|
|
||||||
|
|
|
@ -709,7 +709,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
#region Constructor(s)
|
#region Constructor(s)
|
||||||
|
|
||||||
public ScenePresence(
|
public ScenePresence(
|
||||||
IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance, PresenceType type)
|
IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
|
||||||
{
|
{
|
||||||
AttachmentsSyncLock = new Object();
|
AttachmentsSyncLock = new Object();
|
||||||
|
|
||||||
|
@ -718,14 +718,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_animator = new ScenePresenceAnimator(this);
|
m_animator = new ScenePresenceAnimator(this);
|
||||||
PresenceType = type;
|
PresenceType = type;
|
||||||
m_DrawDistance = world.DefaultDrawDistance;
|
m_DrawDistance = world.DefaultDrawDistance;
|
||||||
m_rootRegionHandle = reginfo.RegionHandle;
|
m_rootRegionHandle = world.RegionInfo.RegionHandle;
|
||||||
m_controllingClient = client;
|
m_controllingClient = client;
|
||||||
m_firstname = m_controllingClient.FirstName;
|
m_firstname = m_controllingClient.FirstName;
|
||||||
m_lastname = m_controllingClient.LastName;
|
m_lastname = m_controllingClient.LastName;
|
||||||
m_name = String.Format("{0} {1}", m_firstname, m_lastname);
|
m_name = String.Format("{0} {1}", m_firstname, m_lastname);
|
||||||
m_scene = world;
|
m_scene = world;
|
||||||
m_uuid = client.AgentId;
|
m_uuid = client.AgentId;
|
||||||
m_regionInfo = reginfo;
|
m_regionInfo = world.RegionInfo;
|
||||||
m_localId = m_scene.AllocateLocalId();
|
m_localId = m_scene.AllocateLocalId();
|
||||||
|
|
||||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
|
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
|
||||||
|
|
Loading…
Reference in New Issue