aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs33
1 files changed, 27 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
index 2fd21be..fb8c306 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
84 { 84 {
85 } 85 }
86 86
87 public Type ReplaceableInterface 87 public Type ReplaceableInterface
88 { 88 {
89 get { return null; } 89 get { return null; }
90 } 90 }
@@ -126,15 +126,36 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
126 126
127 public LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess) 127 public LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess)
128 { 128 {
129 m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}", 129// m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}",
130 regionHandle, m_Scenes.Count); 130// regionHandle, m_Scenes.Count);
131
132 uint rx = 0, ry = 0;
133 Util.RegionHandleToWorldLoc(regionHandle, out rx, out ry);
134 rx += x;
135 ry += y;
131 foreach (Scene s in m_Scenes) 136 foreach (Scene s in m_Scenes)
132 { 137 {
133 if (s.RegionInfo.RegionHandle == regionHandle) 138 uint t = s.RegionInfo.WorldLocX;
139 if( rx < t)
140 continue;
141 t += s.RegionInfo.RegionSizeX;
142 if( rx >= t)
143 continue;
144 t = s.RegionInfo.WorldLocY;
145 if( ry < t)
146 continue;
147 t += s.RegionInfo.RegionSizeY;
148 if( ry < t)
134 { 149 {
135 m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from"); 150// m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from");
151 x = rx - s.RegionInfo.WorldLocX;
152 y = ry - s.RegionInfo.WorldLocY;
136 regionAccess = s.RegionInfo.AccessLevel; 153 regionAccess = s.RegionInfo.AccessLevel;
137 return s.GetLandData(x, y); 154 LandData land = s.GetLandData(x, y);
155 IDwellModule dwellModule = s.RequestModuleInterface<IDwellModule>();
156 if (dwellModule != null)
157 land.Dwell = dwellModule.GetDwell(land);
158 return land;
138 } 159 }
139 } 160 }
140 m_log.DebugFormat("[LAND IN CONNECTOR]: region handle {0} not found", regionHandle); 161 m_log.DebugFormat("[LAND IN CONNECTOR]: region handle {0} not found", regionHandle);