diff options
author | UbitUmarov | 2016-11-20 22:09:33 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-20 22:09:33 +0000 |
commit | b70e48c8a5e13074480bdd89a810ff8c73dc8afb (patch) | |
tree | b990f0f2ef07ab1c1be6cce36f90bbf39069f6f6 /OpenSim/Region/CoreModules/Framework/EntityTransfer | |
parent | Merge branch 'master' of opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-b70e48c8a5e13074480bdd89a810ff8c73dc8afb.zip opensim-SC_OLD-b70e48c8a5e13074480bdd89a810ff8c73dc8afb.tar.gz opensim-SC_OLD-b70e48c8a5e13074480bdd89a810ff8c73dc8afb.tar.bz2 opensim-SC_OLD-b70e48c8a5e13074480bdd89a810ff8c73dc8afb.tar.xz |
handle HG lm tp to large regions in another way
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 4 |
2 files changed, 17 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 71a0e52..1161571 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -594,12 +594,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
594 | uint x = 0, y = 0; | 594 | uint x = 0, y = 0; |
595 | Util.RegionHandleToWorldLoc(regionHandle, out x, out y); | 595 | Util.RegionHandleToWorldLoc(regionHandle, out x, out y); |
596 | 596 | ||
597 | GridRegion reg; | ||
598 | |||
599 | // handle legacy HG. liked regions are mapped into y = 0 and have no size information | ||
600 | // so we can only search by base handle | ||
601 | if( y == 0) | ||
602 | { | ||
603 | reg = gridService.GetRegionByPosition(scope, (int)x, (int)y); | ||
604 | return reg; | ||
605 | } | ||
606 | |||
597 | // Compute the world location we're teleporting to | 607 | // Compute the world location we're teleporting to |
598 | double worldX = (double)x + position.X; | 608 | double worldX = (double)x + position.X; |
599 | double worldY = (double)y + position.Y; | 609 | double worldY = (double)y + position.Y; |
600 | 610 | ||
601 | // Find the region that contains the position | 611 | // Find the region that contains the position |
602 | GridRegion reg = GetRegionContainingWorldLocation(gridService, scope, worldX, worldY); | 612 | reg = GetRegionContainingWorldLocation(gridService, scope, worldX, worldY); |
603 | 613 | ||
604 | if (reg != null) | 614 | if (reg != null) |
605 | { | 615 | { |
@@ -813,8 +823,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
813 | if (OutSideViewRange) | 823 | if (OutSideViewRange) |
814 | { | 824 | { |
815 | m_log.DebugFormat( | 825 | m_log.DebugFormat( |
816 | "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for agent {3} from {4}", | 826 | "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} size {3},{4} needs new child agent for agent {5} from {6}", |
817 | finalDestination.RegionName, newRegionX, newRegionY, sp.Name, Scene.Name); | 827 | finalDestination.RegionName, newRegionX, newRegionY,newSizeX, newSizeY, sp.Name, Scene.Name); |
818 | 828 | ||
819 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); | 829 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); |
820 | #region IP Translation for NAT | 830 | #region IP Translation for NAT |
@@ -2180,8 +2190,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2180 | #endregion // NotFoundLocationCache class | 2190 | #endregion // NotFoundLocationCache class |
2181 | private NotFoundLocationCache m_notFoundLocationCache = new NotFoundLocationCache(); | 2191 | private NotFoundLocationCache m_notFoundLocationCache = new NotFoundLocationCache(); |
2182 | 2192 | ||
2183 | // needed for old grid code | ||
2184 | |||
2185 | protected GridRegion GetRegionContainingWorldLocation(IGridService pGridService, UUID pScopeID, double px, double py) | 2193 | protected GridRegion GetRegionContainingWorldLocation(IGridService pGridService, UUID pScopeID, double px, double py) |
2186 | { | 2194 | { |
2187 | // Since we don't know how big the regions could be, we have to search a very large area | 2195 | // Since we don't know how big the regions could be, we have to search a very large area |
@@ -2191,6 +2199,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2191 | 2199 | ||
2192 | // Given a world position, get the GridRegion info for | 2200 | // Given a world position, get the GridRegion info for |
2193 | // the region containing that point. | 2201 | // the region containing that point. |
2202 | // for compatibility with old grids it does a scan to find large regions | ||
2203 | // 0.9 grids to that | ||
2204 | |||
2194 | protected GridRegion GetRegionContainingWorldLocation(IGridService pGridService, UUID pScopeID, | 2205 | protected GridRegion GetRegionContainingWorldLocation(IGridService pGridService, UUID pScopeID, |
2195 | double px, double py, uint pSizeHint) | 2206 | double px, double py, uint pSizeHint) |
2196 | { | 2207 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 49307f6..a9aaf12 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -515,9 +515,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
515 | GridRegion info = Scene.GridService.GetRegionByUUID(UUID.Zero, lm.RegionID); | 515 | GridRegion info = Scene.GridService.GetRegionByUUID(UUID.Zero, lm.RegionID); |
516 | 516 | ||
517 | // Local region? | 517 | // Local region? |
518 | // HG link is broken for large regions | 518 | if (info != null) |
519 | // so ignore its information so lms to large regions can work | ||
520 | if (info != null && info.RegionLocY != 0) | ||
521 | { | 519 | { |
522 | Scene.RequestTeleportLocation( | 520 | Scene.RequestTeleportLocation( |
523 | remoteClient, info.RegionHandle, lm.Position, | 521 | remoteClient, info.RegionHandle, lm.Position, |