Moved instantiation of SceneCommunicationService object to inside the scene constructor. This was a left over from the original monolithic design of scene communications. The less the instantiators of scenes know about the scene's internals, the better.
parent
f6d79c7cbb
commit
5648eb7bd1
|
@ -752,10 +752,8 @@ namespace OpenSim
|
||||||
Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ);
|
Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ);
|
||||||
PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent);
|
PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent);
|
||||||
|
|
||||||
SceneCommunicationService sceneGridService = new SceneCommunicationService();
|
|
||||||
|
|
||||||
return new Scene(
|
return new Scene(
|
||||||
regionInfo, circuitManager, physicsScene, sceneGridService,
|
regionInfo, circuitManager, physicsScene,
|
||||||
simDataService, estateDataService,
|
simDataService, estateDataService,
|
||||||
Config, m_version);
|
Config, m_version);
|
||||||
}
|
}
|
||||||
|
|
|
@ -851,7 +851,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
public Scene(RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
|
public Scene(RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
|
||||||
SceneCommunicationService sceneGridService,
|
|
||||||
ISimulationDataService simDataService, IEstateDataService estateDataService,
|
ISimulationDataService simDataService, IEstateDataService estateDataService,
|
||||||
IConfigSource config, string simulatorVersion)
|
IConfigSource config, string simulatorVersion)
|
||||||
: this(regInfo, physicsScene)
|
: this(regInfo, physicsScene)
|
||||||
|
@ -865,7 +864,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue / 2)) + (uint)(uint.MaxValue / 4);
|
m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue / 2)) + (uint)(uint.MaxValue / 4);
|
||||||
m_authenticateHandler = authen;
|
m_authenticateHandler = authen;
|
||||||
m_sceneGridService = sceneGridService;
|
m_sceneGridService = new SceneCommunicationService();
|
||||||
m_SimulationDataService = simDataService;
|
m_SimulationDataService = simDataService;
|
||||||
m_EstateDataService = estateDataService;
|
m_EstateDataService = estateDataService;
|
||||||
|
|
||||||
|
|
|
@ -148,8 +148,6 @@ namespace OpenSim.Tests.Common
|
||||||
regInfo.RegionSizeX = sizeX;
|
regInfo.RegionSizeX = sizeX;
|
||||||
regInfo.RegionSizeY = sizeY;
|
regInfo.RegionSizeY = sizeY;
|
||||||
|
|
||||||
SceneCommunicationService scs = new SceneCommunicationService();
|
|
||||||
|
|
||||||
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
|
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
|
||||||
physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
|
physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
|
||||||
Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ);
|
Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ);
|
||||||
|
@ -158,7 +156,7 @@ namespace OpenSim.Tests.Common
|
||||||
"basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent);
|
"basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent);
|
||||||
|
|
||||||
TestScene testScene = new TestScene(
|
TestScene testScene = new TestScene(
|
||||||
regInfo, m_acm, physicsScene, scs, SimDataService, m_estateDataService, configSource, null);
|
regInfo, m_acm, physicsScene, SimDataService, m_estateDataService, configSource, null);
|
||||||
|
|
||||||
INonSharedRegionModule godsModule = new GodsModule();
|
INonSharedRegionModule godsModule = new GodsModule();
|
||||||
godsModule.Initialise(new IniConfigSource());
|
godsModule.Initialise(new IniConfigSource());
|
||||||
|
|
|
@ -42,9 +42,9 @@ namespace OpenSim.Tests.Common
|
||||||
{
|
{
|
||||||
public TestScene(
|
public TestScene(
|
||||||
RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
|
RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
|
||||||
SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
|
ISimulationDataService simDataService, IEstateDataService estateDataService,
|
||||||
IConfigSource config, string simulatorVersion)
|
IConfigSource config, string simulatorVersion)
|
||||||
: base(regInfo, authen, physicsScene, sceneGridService, simDataService, estateDataService,
|
: base(regInfo, authen, physicsScene, simDataService, estateDataService,
|
||||||
config, simulatorVersion)
|
config, simulatorVersion)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue