aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs21
1 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a85a36e..ad73f47 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2022,27 +2022,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2022 protected LSL_Vector GetPartLocalPos(SceneObjectPart part) 2022 protected LSL_Vector GetPartLocalPos(SceneObjectPart part)
2023 { 2023 {
2024 m_host.AddScriptLPS(1); 2024 m_host.AddScriptLPS(1);
2025
2026 Vector3 pos;
2027
2025 if (part.ParentID == 0) 2028 if (part.ParentID == 0)
2026 { 2029 {
2027 return new LSL_Vector(part.AbsolutePosition.X, 2030 pos = part.AbsolutePosition;
2028 part.AbsolutePosition.Y,
2029 part.AbsolutePosition.Z);
2030 } 2031 }
2031 else 2032 else
2032 { 2033 {
2033 if (m_host.IsRoot) 2034 if (part.IsRoot)
2034 { 2035 {
2035 return new LSL_Vector(m_host.AttachedPos.X, 2036 pos = part.AttachedPos;
2036 m_host.AttachedPos.Y,
2037 m_host.AttachedPos.Z);
2038 } 2037 }
2039 else 2038 else
2040 { 2039 {
2041 return new LSL_Vector(part.OffsetPosition.X, 2040 pos = part.OffsetPosition;
2042 part.OffsetPosition.Y,
2043 part.OffsetPosition.Z);
2044 } 2041 }
2045 } 2042 }
2043
2044// m_log.DebugFormat("[LSL API]: Returning {0} in GetPartLocalPos()", pos);
2045
2046 return new LSL_Vector(pos.X, pos.Y, pos.Z);
2046 } 2047 }
2047 2048
2048 public void llSetRot(LSL_Rotation rot) 2049 public void llSetRot(LSL_Rotation rot)