From de85aabcbe51472a34b83943d0993e25b63ca074 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 24 Aug 2010 12:41:21 +0100 Subject: Plumb the region type through to the ProductName field in estate messages --- OpenSim/Framework/RegionInfoForEstateMenuArgs.cs | 3 ++- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 4 ++-- OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs b/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs index fee3126..f274da2 100644 --- a/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs +++ b/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs @@ -47,5 +47,6 @@ namespace OpenSim.Framework public bool useEstateSun; public float waterHeight; public string simName; + public string regionType; } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index db81fb9..320a2fa 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -717,7 +717,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP handshake.RegionInfo3.CPURatio = 1; handshake.RegionInfo3.ColoName = Utils.EmptyBytes; - handshake.RegionInfo3.ProductName = Utils.EmptyBytes; + handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; OutPacket(handshake, ThrottleOutPacketType.Task); @@ -4106,7 +4106,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue; rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue; rinfopack.RegionInfo2.MaxAgents32 = uint.MaxValue; - rinfopack.RegionInfo2.ProductName = Utils.EmptyBytes; + rinfopack.RegionInfo2.ProductName = Util.StringToBytes256(args.regionType); rinfopack.RegionInfo2.ProductSKU = Utils.EmptyBytes; rinfopack.HasVariableBlocks = true; diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 51f2c41..5025c88 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -670,6 +670,7 @@ namespace OpenSim.Region.CoreModules.World.Estate args.useEstateSun = m_scene.RegionInfo.RegionSettings.UseEstateSun; args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; args.simName = m_scene.RegionInfo.RegionName; + args.regionType = m_scene.RegionInfo.RegionType; remote_client.SendRegionInfoToEstateMenu(args); } -- cgit v1.1 From a7a45cb22cd0488d89fa6ca53757a21188d6842f Mon Sep 17 00:00:00 2001 From: Marck Date: Tue, 24 Aug 2010 10:33:50 +0200 Subject: Patch by Apelsin that fixes behaviour of llSetPos and llGetLocalPos for attachments. This fixes Mantis #3923. Signed-off-by: Melanie --- .../Shared/Api/Implementation/LSL_Api.cs | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index dc43e45..21604d0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1936,7 +1936,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (part.ParentGroup.RootPart == part) { - if ((targetPos.z < ground) && disable_underground_movement) + if ((targetPos.z < ground) && disable_underground_movement && m_host.AttachmentPoint == 0) targetPos.z = ground; SceneObjectGroup parent = part.ParentGroup; LSL_Vector real_vec = SetPosAdjust(currentPos, targetPos); @@ -1968,18 +1968,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected LSL_Vector GetPartLocalPos(SceneObjectPart part) { m_host.AddScriptLPS(1); - if (part.ParentID != 0) - { - return new LSL_Vector(part.OffsetPosition.X, - part.OffsetPosition.Y, - part.OffsetPosition.Z); - } - else + if (part.ParentID == 0) { return new LSL_Vector(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z); } + else + { + if (m_host.IsRoot) + { + return new LSL_Vector(m_host.AttachedPos.X, + m_host.AttachedPos.Y, + m_host.AttachedPos.Z); + } + else + { + return new LSL_Vector(part.OffsetPosition.X, + part.OffsetPosition.Y, + part.OffsetPosition.Z); + } + } } public void llSetRot(LSL_Rotation rot) -- cgit v1.1