aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-08-30 00:58:47 +0100
committerJustin Clark-Casey (justincc)2014-08-30 00:58:47 +0100
commitbb7c88805a5b9eaad5be4183c9c9f71c102e1abf (patch)
tree152a2bb378e8edcb0d4074d1aef0d74d87ed8e60 /OpenSim/Region/ScriptEngine/Shared/Api
parentminor: fix wrong indentation in previous commit 0cc3cd (diff)
downloadopensim-SC_OLD-bb7c88805a5b9eaad5be4183c9c9f71c102e1abf.zip
opensim-SC_OLD-bb7c88805a5b9eaad5be4183c9c9f71c102e1abf.tar.gz
opensim-SC_OLD-bb7c88805a5b9eaad5be4183c9c9f71c102e1abf.tar.bz2
opensim-SC_OLD-bb7c88805a5b9eaad5be4183c9c9f71c102e1abf.tar.xz
As per the LL grid, for attachments make llGetObjectDetails() OBJECT_VELOCITY return the avatar's velocity and not always Vector3.Zero.
This completes http://opensimulator.org/mantis/view.php?id=7177
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs16
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()));