mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
First pass at the heart surgery for grid services. Compiles and runs minimally. A few bugs to catch now.
This commit is contained in:
@@ -50,6 +50,9 @@ using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
|
||||
using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
|
||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
|
||||
using OpenSim.Services.Interfaces;
|
||||
|
||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
|
||||
using AssetLandmark = OpenSim.Framework.AssetLandmark;
|
||||
|
||||
@@ -5226,12 +5229,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY);
|
||||
List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
|
||||
|
||||
uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x;
|
||||
uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
|
||||
|
||||
foreach (SimpleRegionInfo sri in neighbors)
|
||||
foreach (GridRegion sri in neighbors)
|
||||
{
|
||||
if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY)
|
||||
return 0;
|
||||
@@ -8181,7 +8184,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
string reply = String.Empty;
|
||||
|
||||
RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator);
|
||||
GridRegion info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
|
||||
|
||||
switch (data)
|
||||
{
|
||||
@@ -8208,7 +8211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
ConditionalScriptSleep(1000);
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
int access = info.RegionSettings.Maturity;
|
||||
int access = info.Maturity;
|
||||
if (access == 0)
|
||||
reply = "PG";
|
||||
else if (access == 1)
|
||||
|
||||
@@ -48,6 +48,8 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
|
||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
|
||||
using TPFlags = OpenSim.Framework.Constants.TeleportFlags;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
|
||||
@@ -599,17 +601,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (regionName.Contains(".") && regionName.Contains(":"))
|
||||
{
|
||||
// Try to link the region
|
||||
RegionInfo regInfo = HGHyperlink.TryLinkRegion(World,
|
||||
presence.ControllingClient,
|
||||
regionName);
|
||||
// Get the region name
|
||||
if (regInfo != null)
|
||||
IHyperlinkService hyperService = World.RequestModuleInterface<IHyperlinkService>();
|
||||
if (hyperService != null)
|
||||
{
|
||||
regionName = regInfo.RegionName;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Might need to ping the client here in case of failure??
|
||||
GridRegion regInfo = hyperService.TryLinkRegion(presence.ControllingClient,
|
||||
regionName);
|
||||
// Get the region name
|
||||
if (regInfo != null)
|
||||
{
|
||||
regionName = regInfo.RegionName;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Might need to ping the client here in case of failure??
|
||||
}
|
||||
}
|
||||
}
|
||||
presence.ControllingClient.SendTeleportLocationStart();
|
||||
|
||||
Reference in New Issue
Block a user