From bcc0f3265d69e13118fe209ff1303ba84ef0dfe2 Mon Sep 17 00:00:00 2001 From: darok Date: Sat, 3 Nov 2007 20:50:11 +0000 Subject: [PATCH] Fixes a bug with a ZERO Quaternion when creating a prim. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index b558bb2abb..535e765477 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -199,10 +199,14 @@ namespace OpenSim.Region.Environment.Scenes { if (PhysActor != null) { - m_rotationOffset.X = PhysActor.Orientation.x; - m_rotationOffset.Y = PhysActor.Orientation.y; - m_rotationOffset.Z = PhysActor.Orientation.z; - m_rotationOffset.W = PhysActor.Orientation.w; + if(PhysActor.Orientation.x != 0 || PhysActor.Orientation.y != 0 + || PhysActor.Orientation.z != 0 || PhysActor.Orientation.w != 0) + { + m_rotationOffset.X = PhysActor.Orientation.x; + m_rotationOffset.Y = PhysActor.Orientation.y; + m_rotationOffset.Z = PhysActor.Orientation.z; + m_rotationOffset.W = PhysActor.Orientation.w; + } } return m_rotationOffset; }