diff options
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 17 |
2 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 520d794..1e09610 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -566,7 +566,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
566 | /// <param name="silent"></param> | 566 | /// <param name="silent"></param> |
567 | protected void AttachToAgent(ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) | 567 | protected void AttachToAgent(ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) |
568 | { | 568 | { |
569 | |||
570 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", Name, avatar.Name, | 569 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", Name, avatar.Name, |
571 | attachmentpoint, attachOffset, so.RootPart.AttachedPos); | 570 | attachmentpoint, attachOffset, so.RootPart.AttachedPos); |
572 | 571 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c8bce60..7759b0a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2214,7 +2214,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2214 | public LSL_Vector llGetVel() | 2214 | public LSL_Vector llGetVel() |
2215 | { | 2215 | { |
2216 | m_host.AddScriptLPS(1); | 2216 | m_host.AddScriptLPS(1); |
2217 | return new LSL_Vector(m_host.Velocity.X, m_host.Velocity.Y, m_host.Velocity.Z); | 2217 | |
2218 | Vector3 vel; | ||
2219 | |||
2220 | if (m_host.IsAttachment) | ||
2221 | { | ||
2222 | ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.AttachedAvatar); | ||
2223 | vel = avatar.Velocity; | ||
2224 | } | ||
2225 | else | ||
2226 | { | ||
2227 | vel = m_host.Velocity; | ||
2228 | } | ||
2229 | |||
2230 | return new LSL_Vector(vel.X, vel.Y, vel.Z); | ||
2218 | } | 2231 | } |
2219 | 2232 | ||
2220 | public LSL_Vector llGetAccel() | 2233 | public LSL_Vector llGetAccel() |
@@ -10021,8 +10034,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10021 | break; | 10034 | break; |
10022 | } | 10035 | } |
10023 | } | 10036 | } |
10037 | |||
10024 | return ret; | 10038 | return ret; |
10025 | } | 10039 | } |
10040 | |||
10026 | SceneObjectPart obj = World.GetSceneObjectPart(key); | 10041 | SceneObjectPart obj = World.GetSceneObjectPart(key); |
10027 | if (obj != null) | 10042 | if (obj != null) |
10028 | { | 10043 | { |