aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMarck2010-08-24 10:33:50 +0200
committerMelanie2010-08-24 19:19:26 +0100
commita7a45cb22cd0488d89fa6ca53757a21188d6842f (patch)
tree10a6aefcc4880895567e8385bb0cf0539939f487 /OpenSim/Region/ScriptEngine
parentPlumb the region type through to the ProductName field in estate messages (diff)
downloadopensim-SC-a7a45cb22cd0488d89fa6ca53757a21188d6842f.zip
opensim-SC-a7a45cb22cd0488d89fa6ca53757a21188d6842f.tar.gz
opensim-SC-a7a45cb22cd0488d89fa6ca53757a21188d6842f.tar.bz2
opensim-SC-a7a45cb22cd0488d89fa6ca53757a21188d6842f.tar.xz
Patch by Apelsin that fixes behaviour of llSetPos and llGetLocalPos for attachments.
This fixes Mantis #3923. Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs25
1 files 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
1936 1936
1937 if (part.ParentGroup.RootPart == part) 1937 if (part.ParentGroup.RootPart == part)
1938 { 1938 {
1939 if ((targetPos.z < ground) && disable_underground_movement) 1939 if ((targetPos.z < ground) && disable_underground_movement && m_host.AttachmentPoint == 0)
1940 targetPos.z = ground; 1940 targetPos.z = ground;
1941 SceneObjectGroup parent = part.ParentGroup; 1941 SceneObjectGroup parent = part.ParentGroup;
1942 LSL_Vector real_vec = SetPosAdjust(currentPos, targetPos); 1942 LSL_Vector real_vec = SetPosAdjust(currentPos, targetPos);
@@ -1968,18 +1968,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1968 protected LSL_Vector GetPartLocalPos(SceneObjectPart part) 1968 protected LSL_Vector GetPartLocalPos(SceneObjectPart part)
1969 { 1969 {
1970 m_host.AddScriptLPS(1); 1970 m_host.AddScriptLPS(1);
1971 if (part.ParentID != 0) 1971 if (part.ParentID == 0)
1972 {
1973 return new LSL_Vector(part.OffsetPosition.X,
1974 part.OffsetPosition.Y,
1975 part.OffsetPosition.Z);
1976 }
1977 else
1978 { 1972 {
1979 return new LSL_Vector(part.AbsolutePosition.X, 1973 return new LSL_Vector(part.AbsolutePosition.X,
1980 part.AbsolutePosition.Y, 1974 part.AbsolutePosition.Y,
1981 part.AbsolutePosition.Z); 1975 part.AbsolutePosition.Z);
1982 } 1976 }
1977 else
1978 {
1979 if (m_host.IsRoot)
1980 {
1981 return new LSL_Vector(m_host.AttachedPos.X,
1982 m_host.AttachedPos.Y,
1983 m_host.AttachedPos.Z);
1984 }
1985 else
1986 {
1987 return new LSL_Vector(part.OffsetPosition.X,
1988 part.OffsetPosition.Y,
1989 part.OffsetPosition.Z);
1990 }
1991 }
1983 } 1992 }
1984 1993
1985 public void llSetRot(LSL_Rotation rot) 1994 public void llSetRot(LSL_Rotation rot)