mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'master' into vehicles
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;
|
||||
|
||||
@@ -2010,10 +2013,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
|
||||
}
|
||||
else
|
||||
q = part.ParentGroup.GroupRotation; // Likely never get here but just in case
|
||||
q = part.ParentGroup.Rotation; // Likely never get here but just in case
|
||||
}
|
||||
else
|
||||
q = part.ParentGroup.GroupRotation; // just the group rotation
|
||||
q = part.ParentGroup.Rotation; // just the group rotation
|
||||
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
|
||||
}
|
||||
q = part.GetWorldRotation();
|
||||
@@ -5002,6 +5005,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (end > src.Length)
|
||||
end = src.Length;
|
||||
|
||||
if (stride == 0)
|
||||
stride = 1;
|
||||
|
||||
// There may be one or two ranges to be considered
|
||||
|
||||
if (start != end)
|
||||
@@ -5028,9 +5034,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// A negative stride reverses the direction of the
|
||||
// scan producing an inverted list as a result.
|
||||
|
||||
if (stride == 0)
|
||||
stride = 1;
|
||||
|
||||
if (stride > 0)
|
||||
{
|
||||
for (int i = 0; i < src.Length; i += stride)
|
||||
@@ -5054,7 +5057,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Add(src.Data[start]);
|
||||
if (start%stride == 0)
|
||||
{
|
||||
result.Add(src.Data[start]);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -5232,12 +5238,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;
|
||||
@@ -7178,10 +7184,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
else
|
||||
q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
|
||||
else
|
||||
q = m_host.ParentGroup.GroupRotation; // Likely never get here but just in case
|
||||
q = m_host.ParentGroup.Rotation; // Likely never get here but just in case
|
||||
}
|
||||
else
|
||||
q = m_host.ParentGroup.GroupRotation; // just the group rotation
|
||||
q = m_host.ParentGroup.Rotation; // just the group rotation
|
||||
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
|
||||
}
|
||||
|
||||
@@ -8184,7 +8190,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)
|
||||
{
|
||||
@@ -8211,7 +8217,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