aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorunknown2010-08-06 12:37:34 -0400
committerMelanie2010-08-06 17:38:29 +0100
commit54dcfe3f2df7d26e7351c3bfd72d2babf04160c3 (patch)
tree0d517fda6723a4381ad8e0d6ecd878dd0df9177a /OpenSim
parentChange XEngine to use the new constant (diff)
downloadopensim-SC_OLD-54dcfe3f2df7d26e7351c3bfd72d2babf04160c3.zip
opensim-SC_OLD-54dcfe3f2df7d26e7351c3bfd72d2babf04160c3.tar.gz
opensim-SC_OLD-54dcfe3f2df7d26e7351c3bfd72d2babf04160c3.tar.bz2
opensim-SC_OLD-54dcfe3f2df7d26e7351c3bfd72d2babf04160c3.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>
Diffstat (limited to 'OpenSim')
-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 f26fc2e..50ea489 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1929,7 +1929,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1929 protected void SetPos(SceneObjectPart part, LSL_Vector targetPos) 1929 protected void SetPos(SceneObjectPart part, LSL_Vector targetPos)
1930 { 1930 {
1931 // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) 1931 // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
1932 LSL_Vector currentPos = llGetLocalPos(); 1932 LSL_Vector currentPos = GetPartLocalPos((part);
1933 1933
1934 float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y); 1934 float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
1935 bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true); 1935 bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true);
@@ -1962,17 +1962,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1962 public LSL_Vector llGetLocalPos() 1962 public LSL_Vector llGetLocalPos()
1963 { 1963 {
1964 m_host.AddScriptLPS(1); 1964 m_host.AddScriptLPS(1);
1965 if (m_host.ParentID != 0) 1965 return GetPartLocalPos(m_host);
1966 }
1967
1968 protected LSL_Vector GetPartLocalPos(SceneObjectPart part)
1969 {
1970 m_host.AddScriptLPS(1);
1971 if (part.ParentID != 0)
1966 { 1972 {
1967 return new LSL_Vector(m_host.OffsetPosition.X, 1973 return new LSL_Vector(part.OffsetPosition.X,
1968 m_host.OffsetPosition.Y, 1974 part.OffsetPosition.Y,
1969 m_host.OffsetPosition.Z); 1975 part.OffsetPosition.Z);
1970 } 1976 }
1971 else 1977 else
1972 { 1978 {
1973 return new LSL_Vector(m_host.AbsolutePosition.X, 1979 return new LSL_Vector(part.AbsolutePosition.X,
1974 m_host.AbsolutePosition.Y, 1980 part.AbsolutePosition.Y,
1975 m_host.AbsolutePosition.Z); 1981 part.AbsolutePosition.Z);
1976 } 1982 }
1977 } 1983 }
1978 1984