diff options
author | Tom Grimshaw | 2010-07-13 14:57:50 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-07-13 14:57:50 -0700 |
commit | 7270cd0ade15ac7175e8394e085e48955ccb280c (patch) | |
tree | d9973102163b2de1c5d1a9fc4fcfd328dff77b58 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff) | |
download | opensim-SC-7270cd0ade15ac7175e8394e085e48955ccb280c.zip opensim-SC-7270cd0ade15ac7175e8394e085e48955ccb280c.tar.gz opensim-SC-7270cd0ade15ac7175e8394e085e48955ccb280c.tar.bz2 opensim-SC-7270cd0ade15ac7175e8394e085e48955ccb280c.tar.xz |
Second part of the fix for llGetLocalPos; get attachment offset in the root prim of an attachment. This function now behaves in line with SL.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-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 | { |