aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-08-30 00:48:59 +0100
committerJustin Clark-Casey (justincc)2014-08-30 00:48:59 +0100
commit0cc3cdfb4e7c0a74e60ceaad0528cabe857f65e8 (patch)
treefcc7eb414d8908938874d77ce47a28bf57a2bd39 /OpenSim/Region
parentFix issue where moving a seated avatar would not adjust their subsequent stan... (diff)
downloadopensim-SC_OLD-0cc3cdfb4e7c0a74e60ceaad0528cabe857f65e8.zip
opensim-SC_OLD-0cc3cdfb4e7c0a74e60ceaad0528cabe857f65e8.tar.gz
opensim-SC_OLD-0cc3cdfb4e7c0a74e60ceaad0528cabe857f65e8.tar.bz2
opensim-SC_OLD-0cc3cdfb4e7c0a74e60ceaad0528cabe857f65e8.tar.xz
As per the LL grid, for attachments make llGetObjectDetails() OBJECT_ROT return the avatar's rotation.
This is already the behaviour of OBJECT_POS. Partially satisfies http://opensimulator.org/mantis/view.php?id=7177
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5aef892..7f91de2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -11313,17 +11313,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11313 ret.Add(new LSL_Vector(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z)); 11313 ret.Add(new LSL_Vector(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z));
11314 break; 11314 break;
11315 case ScriptBaseClass.OBJECT_ROT: 11315 case ScriptBaseClass.OBJECT_ROT:
11316 Quaternion rot = Quaternion.Identity;
11317
11318 if (obj.ParentGroup.IsAttachment)
11316 { 11319 {
11317 Quaternion rot = Quaternion.Identity; 11320 ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar);
11318 11321
11322 if (sp != null)
11323 rot = sp.GetWorldRotation();
11324 }
11325 else
11326 {
11319 if (obj.ParentGroup.RootPart == obj) 11327 if (obj.ParentGroup.RootPart == obj)
11320 rot = obj.ParentGroup.GroupRotation; 11328 rot = obj.ParentGroup.GroupRotation;
11321 else 11329 else
11322 rot = obj.GetWorldRotation(); 11330 rot = obj.GetWorldRotation();
11323
11324 LSL_Rotation objrot = new LSL_Rotation(rot);
11325 ret.Add(objrot);
11326 } 11331 }
11332
11333 LSL_Rotation objrot = new LSL_Rotation(rot);
11334 ret.Add(objrot);
11335
11327 break; 11336 break;
11328 case ScriptBaseClass.OBJECT_VELOCITY: 11337 case ScriptBaseClass.OBJECT_VELOCITY:
11329 ret.Add(new LSL_Vector(obj.Velocity)); 11338 ret.Add(new LSL_Vector(obj.Velocity));