diff options
author | UbitUmarov | 2016-07-28 00:34:16 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-28 00:34:16 +0100 |
commit | ec8101a24ad8181c12525421024616fc509b60da (patch) | |
tree | 04d12c9203ce76a00a17efa34447d8a5bf821340 /OpenSim/Region/CoreModules/Framework | |
parent | remove the RegionCombinerModule (mega regions), references still all over the... (diff) | |
download | opensim-SC-ec8101a24ad8181c12525421024616fc509b60da.zip opensim-SC-ec8101a24ad8181c12525421024616fc509b60da.tar.gz opensim-SC-ec8101a24ad8181c12525421024616fc509b60da.tar.bz2 opensim-SC-ec8101a24ad8181c12525421024616fc509b60da.tar.xz |
remove references to RegionCombinerModule
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 74 |
1 files changed, 18 insertions, 56 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index fbb99b0..6ad949c 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -173,7 +173,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
173 | private BannedRegionCache m_bannedRegionCache = new BannedRegionCache(); | 173 | private BannedRegionCache m_bannedRegionCache = new BannedRegionCache(); |
174 | 174 | ||
175 | private IEventQueue m_eqModule; | 175 | private IEventQueue m_eqModule; |
176 | private IRegionCombinerModule m_regionCombinerModule; | ||
177 | 176 | ||
178 | #region ISharedRegionModule | 177 | #region ISharedRegionModule |
179 | 178 | ||
@@ -339,7 +338,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
339 | return; | 338 | return; |
340 | 339 | ||
341 | m_eqModule = Scene.RequestModuleInterface<IEventQueue>(); | 340 | m_eqModule = Scene.RequestModuleInterface<IEventQueue>(); |
342 | m_regionCombinerModule = Scene.RequestModuleInterface<IRegionCombinerModule>(); | ||
343 | } | 341 | } |
344 | 342 | ||
345 | #endregion | 343 | #endregion |
@@ -1341,18 +1339,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1341 | protected virtual bool NeedsNewAgent(float viewdist, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, | 1339 | protected virtual bool NeedsNewAgent(float viewdist, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, |
1342 | int oldsizeX, int oldsizeY, int newsizeX, int newsizeY) | 1340 | int oldsizeX, int oldsizeY, int newsizeX, int newsizeY) |
1343 | { | 1341 | { |
1344 | if (m_regionCombinerModule != null && m_regionCombinerModule.IsRootForMegaregion(Scene.RegionInfo.RegionID)) | ||
1345 | { | ||
1346 | Vector2 swCorner, neCorner; | ||
1347 | GetMegaregionViewRange(out swCorner, out neCorner); | ||
1348 | |||
1349 | m_log.DebugFormat( | ||
1350 | "[ENTITY TRANSFER MODULE]: Megaregion view of {0} is from {1} to {2} with new agent check for {3},{4}", | ||
1351 | Scene.Name, swCorner, neCorner, newRegionX, newRegionY); | ||
1352 | |||
1353 | return !(newRegionX >= swCorner.X && newRegionX <= neCorner.X && newRegionY >= swCorner.Y && newRegionY <= neCorner.Y); | ||
1354 | } | ||
1355 | |||
1356 | return Util.IsOutsideView(viewdist, oldRegionX, newRegionX, oldRegionY, newRegionY, | 1342 | return Util.IsOutsideView(viewdist, oldRegionX, newRegionX, oldRegionY, newRegionY, |
1357 | oldsizeX, oldsizeY, newsizeX, newsizeY); | 1343 | oldsizeX, oldsizeY, newsizeX, newsizeY); |
1358 | } | 1344 | } |
@@ -2385,13 +2371,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2385 | { | 2371 | { |
2386 | Vector2 extent = Vector2.Zero; | 2372 | Vector2 extent = Vector2.Zero; |
2387 | 2373 | ||
2388 | if (m_regionCombinerModule != null) | ||
2389 | { | ||
2390 | Vector2 megaRegionSize = m_regionCombinerModule.GetSizeOfMegaregion(Scene.RegionInfo.RegionID); | ||
2391 | extent.X = (float)Util.WorldToRegionLoc((uint)megaRegionSize.X); | ||
2392 | extent.Y = (float)Util.WorldToRegionLoc((uint)megaRegionSize.Y); | ||
2393 | } | ||
2394 | |||
2395 | swCorner.X = Scene.RegionInfo.RegionLocX - 1; | 2374 | swCorner.X = Scene.RegionInfo.RegionLocX - 1; |
2396 | swCorner.Y = Scene.RegionInfo.RegionLocY - 1; | 2375 | swCorner.Y = Scene.RegionInfo.RegionLocY - 1; |
2397 | neCorner.X = Scene.RegionInfo.RegionLocX + extent.X; | 2376 | neCorner.X = Scene.RegionInfo.RegionLocX + extent.X; |
@@ -2411,46 +2390,29 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2411 | RegionInfo m_regionInfo = pScene.RegionInfo; | 2390 | RegionInfo m_regionInfo = pScene.RegionInfo; |
2412 | List<GridRegion> neighbours; | 2391 | List<GridRegion> neighbours; |
2413 | 2392 | ||
2414 | // Leaving this as a "megaregions" computation vs "non-megaregions" computation; it isn't | 2393 | uint dd = (uint)avatar.RegionViewDistance; |
2415 | // clear what should be done with a "far view" given that megaregions already extended the | ||
2416 | // view to include everything in the megaregion | ||
2417 | if (m_regionCombinerModule == null || !m_regionCombinerModule.IsRootForMegaregion(Scene.RegionInfo.RegionID)) | ||
2418 | { | ||
2419 | uint dd = (uint)avatar.RegionViewDistance; | ||
2420 | 2394 | ||
2421 | // until avatar movement updates client connections, we need to seend at least this current region imediate Neighbors | 2395 | // until avatar movement updates client connections, we need to seend at least this current region imediate neighbors |
2422 | uint ddX = Math.Max(dd, Constants.RegionSize); | 2396 | uint ddX = Math.Max(dd, Constants.RegionSize); |
2423 | uint ddY = Math.Max(dd, Constants.RegionSize); | 2397 | uint ddY = Math.Max(dd, Constants.RegionSize); |
2424 | 2398 | ||
2425 | ddX--; | 2399 | ddX--; |
2426 | ddY--; | 2400 | ddY--; |
2427 | 2401 | ||
2428 | // reference to region edges. Should be avatar position | 2402 | // reference to region edges. Should be avatar position |
2429 | uint startX = Util.RegionToWorldLoc(pRegionLocX); | 2403 | uint startX = Util.RegionToWorldLoc(pRegionLocX); |
2430 | uint endX = startX + m_regionInfo.RegionSizeX; | 2404 | uint endX = startX + m_regionInfo.RegionSizeX; |
2431 | uint startY = Util.RegionToWorldLoc(pRegionLocY); | 2405 | uint startY = Util.RegionToWorldLoc(pRegionLocY); |
2432 | uint endY = startY + m_regionInfo.RegionSizeY; | 2406 | uint endY = startY + m_regionInfo.RegionSizeY; |
2433 | 2407 | ||
2434 | startX -= ddX; | 2408 | startX -= ddX; |
2435 | startY -= ddY; | 2409 | startY -= ddY; |
2436 | endX += ddX; | 2410 | endX += ddX; |
2437 | endY += ddY; | 2411 | endY += ddY; |
2438 | 2412 | ||
2439 | neighbours | 2413 | neighbours |
2440 | = avatar.Scene.GridService.GetRegionRange( | 2414 | = avatar.Scene.GridService.GetRegionRange( |
2441 | m_regionInfo.ScopeID, (int)startX, (int)endX, (int)startY, (int)endY); | 2415 | m_regionInfo.ScopeID, (int)startX, (int)endX, (int)startY, (int)endY); |
2442 | } | ||
2443 | else | ||
2444 | { | ||
2445 | Vector2 swCorner, neCorner; | ||
2446 | GetMegaregionViewRange(out swCorner, out neCorner); | ||
2447 | |||
2448 | neighbours | ||
2449 | = pScene.GridService.GetRegionRange( | ||
2450 | m_regionInfo.ScopeID, | ||
2451 | (int)Util.RegionToWorldLoc((uint)swCorner.X), (int)Util.RegionToWorldLoc((uint)neCorner.X), | ||
2452 | (int)Util.RegionToWorldLoc((uint)swCorner.Y), (int)Util.RegionToWorldLoc((uint)neCorner.Y)); | ||
2453 | } | ||
2454 | 2416 | ||
2455 | // The r.RegionFlags == null check only needs to be made for simulators before 2015-01-14 (pre 0.8.1). | 2417 | // The r.RegionFlags == null check only needs to be made for simulators before 2015-01-14 (pre 0.8.1). |
2456 | neighbours.RemoveAll( r => r.RegionID == m_regionInfo.RegionID ); | 2418 | neighbours.RemoveAll( r => r.RegionID == m_regionInfo.RegionID ); |