mantis 8740: fix osTeleportObject set rotation

httptests
UbitUmarov 2017-04-06 12:56:00 +01:00
parent a41924d1f8
commit 1848b1fdb1
1 changed files with 5 additions and 4 deletions

View File

@ -910,11 +910,12 @@ namespace OpenSim.Region.Framework.Scenes
bool setrot = (flags & OSTPOBJ_SETROT) != 0; bool setrot = (flags & OSTPOBJ_SETROT) != 0;
rotation.Normalize(); rotation.Normalize();
bool dorot = (Math.Abs(rotation.W) < 0.999);
Quaternion currentRot = RootPart.RotationOffset; Quaternion currentRot = RootPart.RotationOffset;
if(dorot && setrot)
rotation = rotation * Quaternion.Conjugate(currentRot); if(setrot)
rotation = Quaternion.Conjugate(currentRot) * rotation;
bool dorot = setrot | (Math.Abs(rotation.W) < 0.999);
if(stop) if(stop)
{ {