diff options
Merge branch 'grid-service-redux'
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4c52b11..1ebe24e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -50,6 +50,9 @@ using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; | |||
50 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; | 50 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; |
51 | using OpenSim.Region.ScriptEngine.Interfaces; | 51 | using OpenSim.Region.ScriptEngine.Interfaces; |
52 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | 52 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; |
53 | using OpenSim.Services.Interfaces; | ||
54 | |||
55 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
53 | 56 | ||
54 | using AssetLandmark = OpenSim.Framework.AssetLandmark; | 57 | using AssetLandmark = OpenSim.Framework.AssetLandmark; |
55 | 58 | ||
@@ -5226,12 +5229,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5226 | } | 5229 | } |
5227 | } | 5230 | } |
5228 | 5231 | ||
5229 | List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); | 5232 | List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID); |
5230 | 5233 | ||
5231 | uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; | 5234 | uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; |
5232 | uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; | 5235 | uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; |
5233 | 5236 | ||
5234 | foreach (SimpleRegionInfo sri in neighbors) | 5237 | foreach (GridRegion sri in neighbors) |
5235 | { | 5238 | { |
5236 | if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) | 5239 | if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) |
5237 | return 0; | 5240 | return 0; |
@@ -8181,7 +8184,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8181 | 8184 | ||
8182 | string reply = String.Empty; | 8185 | string reply = String.Empty; |
8183 | 8186 | ||
8184 | RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator); | 8187 | GridRegion info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator); |
8185 | 8188 | ||
8186 | switch (data) | 8189 | switch (data) |
8187 | { | 8190 | { |
@@ -8208,7 +8211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8208 | ConditionalScriptSleep(1000); | 8211 | ConditionalScriptSleep(1000); |
8209 | return UUID.Zero.ToString(); | 8212 | return UUID.Zero.ToString(); |
8210 | } | 8213 | } |
8211 | int access = info.RegionSettings.Maturity; | 8214 | int access = info.Maturity; |
8212 | if (access == 0) | 8215 | if (access == 0) |
8213 | reply = "PG"; | 8216 | reply = "PG"; |
8214 | else if (access == 1) | 8217 | else if (access == 1) |