aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorunknown2010-08-06 12:37:34 -0400
committerDiva Canto2010-08-11 09:51:01 -0700
commitde0445c8ea794ee3dfc5923cba7f630cb7f4d97d (patch)
tree2914cd89a2aadc3e1c172540870ba0d895e44fcf
parentAllow the trash folder itself to be passed to PurgeFolder (diff)
downloadopensim-SC_OLD-de0445c8ea794ee3dfc5923cba7f630cb7f4d97d.zip
opensim-SC_OLD-de0445c8ea794ee3dfc5923cba7f630cb7f4d97d.tar.gz
opensim-SC_OLD-de0445c8ea794ee3dfc5923cba7f630cb7f4d97d.tar.bz2
opensim-SC_OLD-de0445c8ea794ee3dfc5923cba7f630cb7f4d97d.tar.xz
Fixes: llSetLinkPrimitiveParams - PRIM_POSITION is not relative to root, causes unexpected movement of child prims
Signed-off-by: Melanie <melanie@t-data.com>
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs22
1 files changed, 14 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 26dba30..759c00a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1919,7 +1919,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1919 protected void SetPos(SceneObjectPart part, LSL_Vector targetPos) 1919 protected void SetPos(SceneObjectPart part, LSL_Vector targetPos)
1920 { 1920 {
1921 // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) 1921 // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
1922 LSL_Vector currentPos = llGetLocalPos(); 1922 LSL_Vector currentPos = GetPartLocalPos((part);
1923 1923
1924 float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y); 1924 float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
1925 bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true); 1925 bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true);
@@ -1952,17 +1952,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1952 public LSL_Vector llGetLocalPos() 1952 public LSL_Vector llGetLocalPos()
1953 { 1953 {
1954 m_host.AddScriptLPS(1); 1954 m_host.AddScriptLPS(1);
1955 if (m_host.ParentID != 0) 1955 return GetPartLocalPos(m_host);
1956 }
1957
1958 protected LSL_Vector GetPartLocalPos(SceneObjectPart part)
1959 {
1960 m_host.AddScriptLPS(1);
1961 if (part.ParentID != 0)
1956 { 1962 {
1957 return new LSL_Vector(m_host.OffsetPosition.X, 1963 return new LSL_Vector(part.OffsetPosition.X,
1958 m_host.OffsetPosition.Y, 1964 part.OffsetPosition.Y,
1959 m_host.OffsetPosition.Z); 1965 part.OffsetPosition.Z);
1960 } 1966 }
1961 else 1967 else
1962 { 1968 {
1963 return new LSL_Vector(m_host.AbsolutePosition.X, 1969 return new LSL_Vector(part.AbsolutePosition.X,
1964 m_host.AbsolutePosition.Y, 1970 part.AbsolutePosition.Y,
1965 m_host.AbsolutePosition.Z); 1971 part.AbsolutePosition.Z);
1966 } 1972 }
1967 } 1973 }
1968 1974