From 39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 16 Sep 2009 15:45:40 -0700 Subject: * Adding Scale to EntityBase * Fixing the incorrect initialization of EntityBase.Rotation * Removed SceneObjectGroup.GroupRotation and added overrides for Scale/Rotation/Velocity --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ba42678..39f620b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2004,10 +2004,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(); @@ -7171,10 +7171,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); } -- cgit v1.1 From 5757afe7665543e8b3ed4a322a7d6e095dafcdb3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 26 Sep 2009 07:48:21 -0700 Subject: First pass at the heart surgery for grid services. Compiles and runs minimally. A few bugs to catch now. --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') 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; 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 neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); + List 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) -- cgit v1.1 From a43706862c13944c92b3762ed8742415a0363275 Mon Sep 17 00:00:00 2001 From: Alan M Webb Date: Tue, 29 Sep 2009 07:10:54 -0400 Subject: Given the perverse way that strided works, if there is only one element in the range, it must also coincide with the specified stride. The existing code assumes that the stride starts at start ( which is the expected and most useful behavior). Signed-off-by: dr scofield (aka dirk husemann) --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1ebe24e..0bd6546 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4999,6 +4999,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) @@ -5025,9 +5028,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) @@ -5051,7 +5051,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } else { - result.Add(src.Data[start]); + if (start%stride == 0) + { + result.Add(src.Data[start]); + } } return result; -- cgit v1.1