Return world rotation on llGetObjectDetails()'s OBJECT_ROT

avinationmerge
Melanie 2012-07-29 15:40:31 +02:00
parent 30784ab9e1
commit 88d68e68c1
1 changed files with 10 additions and 4 deletions

View File

@ -11846,11 +11846,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ret.Add(new LSL_Vector(opos.X, opos.Y, opos.Z));
break;
case ScriptBaseClass.OBJECT_ROT:
// Quaternion orot = obj.RotationOffset;
// ret.Add(new LSL_Rotation(orot.X, orot.Y, orot.Z, orot.W));
{
Quaternion rot = Quaternion.Identity;
LSL_Rotation objrot = GetPartRot(obj);
ret.Add(objrot);
if (obj.ParentGroup.RootPart == obj)
rot = obj.ParentGroup.GroupRotation;
else
rot = obj.GetWorldRotation();
LSL_Rotation objrot = new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W);
ret.Add(objrot);
}
break;
case ScriptBaseClass.OBJECT_VELOCITY:
Vector3 ovel = obj.Velocity;