Merge branch 'master' into httptests
commit
8971e9f126
|
@ -388,19 +388,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public bool AddNewSceneObject(
|
public bool AddNewSceneObject(
|
||||||
SceneObjectGroup sceneObject, bool attachToBackup, Vector3? pos, Quaternion? rot, Vector3 vel)
|
SceneObjectGroup sceneObject, bool attachToBackup, Vector3? pos, Quaternion? rot, Vector3 vel)
|
||||||
{
|
{
|
||||||
AddNewSceneObject(sceneObject, attachToBackup, false);
|
|
||||||
|
|
||||||
if (pos != null)
|
if (pos != null)
|
||||||
sceneObject.AbsolutePosition = (Vector3)pos;
|
sceneObject.AbsolutePosition = (Vector3)pos;
|
||||||
|
|
||||||
|
if (rot != null)
|
||||||
|
sceneObject.UpdateGroupRotationR((Quaternion)rot);
|
||||||
|
|
||||||
|
AddNewSceneObject(sceneObject, attachToBackup, false);
|
||||||
|
|
||||||
if (sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim)
|
if (sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim)
|
||||||
{
|
{
|
||||||
sceneObject.ClearPartAttachmentData();
|
sceneObject.ClearPartAttachmentData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rot != null)
|
|
||||||
sceneObject.UpdateGroupRotationR((Quaternion)rot);
|
|
||||||
|
|
||||||
PhysicsActor pa = sceneObject.RootPart.PhysActor;
|
PhysicsActor pa = sceneObject.RootPart.PhysActor;
|
||||||
if (pa != null && pa.IsPhysical && vel != Vector3.Zero)
|
if (pa != null && pa.IsPhysical && vel != Vector3.Zero)
|
||||||
{
|
{
|
||||||
|
|
|
@ -941,20 +941,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// If this is a root of a linkset, the real rotation is what the physics engine thinks.
|
// If this is a root of a linkset, the real rotation is what the physics engine thinks.
|
||||||
// If not a root prim, the offset rotation is computed by SOG and is relative to the root.
|
// If not a root prim, the offset rotation is computed by SOG and is relative to the root.
|
||||||
if (ParentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null)
|
if (ParentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null)
|
||||||
{
|
m_rotationOffset = actor.Orientation;
|
||||||
if (actor.Orientation.X != 0f || actor.Orientation.Y != 0f
|
|
||||||
|| actor.Orientation.Z != 0f || actor.Orientation.W != 0f)
|
|
||||||
{
|
|
||||||
m_rotationOffset = actor.Orientation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// float roll, pitch, yaw = 0;
|
|
||||||
// m_rotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
|
|
||||||
//
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[SCENE OBJECT PART]: Got euler {0} for RotationOffset on {1} {2}",
|
|
||||||
// new Vector3(roll, pitch, yaw), Name, LocalId);
|
|
||||||
|
|
||||||
return m_rotationOffset;
|
return m_rotationOffset;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue