aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-02 23:35:03 +0100
committerJustin Clark-Casey (justincc)2014-09-02 23:39:52 +0100
commitd582db6132ef7bea8b15e7a9f0dd64400d43b517 (patch)
treea277f69574ae09020245e4fa3a3f58cb59dceacf /OpenSim/Region/ScriptEngine/Shared/Api
parentAs per the LL grid, if an avatar is sitting then return it's velocity relativ... (diff)
downloadopensim-SC_OLD-d582db6132ef7bea8b15e7a9f0dd64400d43b517.zip
opensim-SC_OLD-d582db6132ef7bea8b15e7a9f0dd64400d43b517.tar.gz
opensim-SC_OLD-d582db6132ef7bea8b15e7a9f0dd64400d43b517.tar.bz2
opensim-SC_OLD-d582db6132ef7bea8b15e7a9f0dd64400d43b517.tar.xz
Fix recent regression from 473c5594 where camera started to judder on moving vehicles.
Other parts of OpenSimulator are relying on SP.Velocity == 0 for vehicles. So add and use SP.GetWorldVelocity() instead when we need vehicle velocity, along the same lines as existing SP.GetWorldRotation()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5d7fc9d..7c384b2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2560,7 +2560,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2560 if (m_host.ParentGroup.IsAttachment) 2560 if (m_host.ParentGroup.IsAttachment)
2561 { 2561 {
2562 ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.AttachedAvatar); 2562 ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.AttachedAvatar);
2563 vel = avatar.Velocity; 2563 vel = avatar.GetWorldVelocity();
2564 } 2564 }
2565 else 2565 else
2566 { 2566 {
@@ -11221,7 +11221,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11221 ret.Add(new LSL_Rotation(av.GetWorldRotation())); 11221 ret.Add(new LSL_Rotation(av.GetWorldRotation()));
11222 break; 11222 break;
11223 case ScriptBaseClass.OBJECT_VELOCITY: 11223 case ScriptBaseClass.OBJECT_VELOCITY:
11224 ret.Add(new LSL_Vector(av.Velocity.X, av.Velocity.Y, av.Velocity.Z)); 11224 ret.Add(new LSL_Vector(av.GetWorldVelocity()));
11225 break; 11225 break;
11226 case ScriptBaseClass.OBJECT_OWNER: 11226 case ScriptBaseClass.OBJECT_OWNER:
11227 ret.Add(new LSL_String(id)); 11227 ret.Add(new LSL_String(id));
@@ -11342,7 +11342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11342 ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar); 11342 ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar);
11343 11343
11344 if (sp != null) 11344 if (sp != null)
11345 vel = sp.Velocity; 11345 vel = sp.GetWorldVelocity();
11346 } 11346 }
11347 else 11347 else
11348 { 11348 {