aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs25
2 files changed, 22 insertions, 14 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;
50using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 50using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
51using OpenSim.Region.ScriptEngine.Interfaces; 51using OpenSim.Region.ScriptEngine.Interfaces;
52using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; 52using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
53using OpenSim.Services.Interfaces;
54
55using GridRegion = OpenSim.Services.Interfaces.GridRegion;
53 56
54using AssetLandmark = OpenSim.Framework.AssetLandmark; 57using 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)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index ccdd4c5..0b95abc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -48,6 +48,8 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
48using OpenSim.Region.ScriptEngine.Interfaces; 48using OpenSim.Region.ScriptEngine.Interfaces;
49using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; 49using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
50using TPFlags = OpenSim.Framework.Constants.TeleportFlags; 50using TPFlags = OpenSim.Framework.Constants.TeleportFlags;
51using OpenSim.Services.Interfaces;
52using GridRegion = OpenSim.Services.Interfaces.GridRegion;
51using System.Text.RegularExpressions; 53using System.Text.RegularExpressions;
52 54
53using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 55using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
@@ -599,17 +601,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
599 if (regionName.Contains(".") && regionName.Contains(":")) 601 if (regionName.Contains(".") && regionName.Contains(":"))
600 { 602 {
601 // Try to link the region 603 // Try to link the region
602 RegionInfo regInfo = HGHyperlink.TryLinkRegion(World, 604 IHyperlinkService hyperService = World.RequestModuleInterface<IHyperlinkService>();
603 presence.ControllingClient, 605 if (hyperService != null)
604 regionName);
605 // Get the region name
606 if (regInfo != null)
607 { 606 {
608 regionName = regInfo.RegionName; 607 GridRegion regInfo = hyperService.TryLinkRegion(presence.ControllingClient,
609 } 608 regionName);
610 else 609 // Get the region name
611 { 610 if (regInfo != null)
612 // Might need to ping the client here in case of failure?? 611 {
612 regionName = regInfo.RegionName;
613 }
614 else
615 {
616 // Might need to ping the client here in case of failure??
617 }
613 } 618 }
614 } 619 }
615 presence.ControllingClient.SendTeleportLocationStart(); 620 presence.ControllingClient.SendTeleportLocationStart();