diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 |
1 files changed, 15 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 ab41156..5d7fc9d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -11335,7 +11335,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11335 | 11335 | ||
11336 | break; | 11336 | break; |
11337 | case ScriptBaseClass.OBJECT_VELOCITY: | 11337 | case ScriptBaseClass.OBJECT_VELOCITY: |
11338 | ret.Add(new LSL_Vector(obj.Velocity)); | 11338 | Vector3 vel = Vector3.Zero; |
11339 | |||
11340 | if (obj.ParentGroup.IsAttachment) | ||
11341 | { | ||
11342 | ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar); | ||
11343 | |||
11344 | if (sp != null) | ||
11345 | vel = sp.Velocity; | ||
11346 | } | ||
11347 | else | ||
11348 | { | ||
11349 | vel = obj.Velocity; | ||
11350 | } | ||
11351 | |||
11352 | ret.Add(vel); | ||
11339 | break; | 11353 | break; |
11340 | case ScriptBaseClass.OBJECT_OWNER: | 11354 | case ScriptBaseClass.OBJECT_OWNER: |
11341 | ret.Add(new LSL_String(obj.OwnerID.ToString())); | 11355 | ret.Add(new LSL_String(obj.OwnerID.ToString())); |