diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 27034ed..976a9ff 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2136,12 +2136,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2136 | public LSL_Vector llGetLocalPos() | 2136 | public LSL_Vector llGetLocalPos() |
2137 | { | 2137 | { |
2138 | m_host.AddScriptLPS(1); | 2138 | m_host.AddScriptLPS(1); |
2139 | if (m_host.IsAttachment == true) { | 2139 | if (m_host.IsAttachment == true) { |
2140 | //m_log.DebugFormat("[localpos]: {0}) {1} {2}",m_host.OffsetPosition.X,m_host.OffsetPosition.Y,m_host.OffsetPosition.Z); | 2140 | if (m_host.IsRoot == true) |
2141 | return new LSL_Vector(m_host.OffsetPosition.X, | 2141 | { |
2142 | m_host.OffsetPosition.Y, | 2142 | return new LSL_Vector(m_host.AbsolutePosition.X, |
2143 | m_host.OffsetPosition.Z); | 2143 | m_host.AbsolutePosition.Y, |
2144 | } | 2144 | m_host.AbsolutePosition.Z); |
2145 | |||
2146 | } | ||
2147 | else | ||
2148 | { | ||
2149 | return new LSL_Vector(m_host.OffsetPosition.X, | ||
2150 | m_host.OffsetPosition.Y, | ||
2151 | m_host.OffsetPosition.Z); | ||
2152 | } | ||
2153 | } | ||
2145 | 2154 | ||
2146 | if (m_host.ParentID != 0) | 2155 | if (m_host.ParentID != 0) |
2147 | { | 2156 | { |