refactor: chain the two scene constructors together to eliminate more copypasta

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-10-13 22:21:03 +01:00
parent a6fa15e8b6
commit fd274a6688
1 changed files with 1 additions and 29 deletions

View File

@ -531,35 +531,12 @@ namespace OpenSim.Region.Framework.Scenes
ISimulationDataService simDataService, IEstateDataService estateDataService,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: this(regInfo)
{
m_config = config;
MinFrameTime = 0.089f;
Random random = new Random();
BordersLocked = true;
Border northBorder = new Border();
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
northBorder.CrossDirection = Cardinals.N;
NorthBorders.Add(northBorder);
Border southBorder = new Border();
southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
southBorder.CrossDirection = Cardinals.S;
SouthBorders.Add(southBorder);
Border eastBorder = new Border();
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
eastBorder.CrossDirection = Cardinals.E;
EastBorders.Add(eastBorder);
Border westBorder = new Border();
westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
westBorder.CrossDirection = Cardinals.W;
WestBorders.Add(westBorder);
BordersLocked = false;
m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue/2))+(uint)(uint.MaxValue/4);
m_moduleLoader = moduleLoader;
@ -567,17 +544,12 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGridService = sceneGridService;
m_SimulationDataService = simDataService;
m_EstateDataService = estateDataService;
m_regInfo = regInfo;
m_regionHandle = m_regInfo.RegionHandle;
m_regionName = m_regInfo.RegionName;
m_lastUpdate = Util.EnvironmentTickCount();
m_physicalPrim = physicalPrim;
m_seeIntoRegionFromNeighbor = SeeIntoRegionFromNeighbor;
m_eventManager = new EventManager();
m_permissions = new ScenePermissions(this);
m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
m_asyncSceneObjectDeleter.Enabled = true;