diff options
author | sacha | 2010-07-13 21:10:26 +0000 |
---|---|---|
committer | sacha | 2010-07-13 21:10:26 +0000 |
commit | 8c26c8bbc6d4ee34b5b9255d3807fb4def88367f (patch) | |
tree | 0dd7c44b09fffd7d4576bea6d74061e8d7922179 /OpenSim/Region/ScriptEngine | |
parent | Removed the CHANGED_COLOR event post from the Color accessor in SOP. This is ... (diff) | |
download | opensim-SC-8c26c8bbc6d4ee34b5b9255d3807fb4def88367f.zip opensim-SC-8c26c8bbc6d4ee34b5b9255d3807fb4def88367f.tar.gz opensim-SC-8c26c8bbc6d4ee34b5b9255d3807fb4def88367f.tar.bz2 opensim-SC-8c26c8bbc6d4ee34b5b9255d3807fb4def88367f.tar.xz |
adding the 'wearble' case for llGetLocalPos.
Still not working cause the offsets are not updated (always <0,0,0>)
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5492266..27034ed 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
74 | /// </summary> | 74 | /// </summary> |
75 | public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi | 75 | public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi |
76 | { | 76 | { |
77 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 77 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
78 | protected IScriptEngine m_ScriptEngine; | 78 | protected IScriptEngine m_ScriptEngine; |
79 | protected SceneObjectPart m_host; | 79 | protected SceneObjectPart m_host; |
80 | protected uint m_localID; | 80 | protected uint m_localID; |
@@ -2136,6 +2136,13 @@ 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) { | ||
2140 | //m_log.DebugFormat("[localpos]: {0}) {1} {2}",m_host.OffsetPosition.X,m_host.OffsetPosition.Y,m_host.OffsetPosition.Z); | ||
2141 | return new LSL_Vector(m_host.OffsetPosition.X, | ||
2142 | m_host.OffsetPosition.Y, | ||
2143 | m_host.OffsetPosition.Z); | ||
2144 | } | ||
2145 | |||
2139 | if (m_host.ParentID != 0) | 2146 | if (m_host.ParentID != 0) |
2140 | { | 2147 | { |
2141 | return new LSL_Vector(m_host.OffsetPosition.X, | 2148 | return new LSL_Vector(m_host.OffsetPosition.X, |