From 9e8b456bbc5d96f33bc30e1c28fb2102d13445af Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Wed, 23 Jul 2008 12:39:16 +0000
Subject: get rid of some LLQuaternion == null checks.  Because LLQuaternion is
 a struct and not a class, it can't be null.  So these checks were just
 generating compiler warnings on unreachable code.

---
 OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

(limited to 'OpenSim/Region')

diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 2434180..2bbdac1 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1618,15 +1618,8 @@ namespace OpenSim.Region.Environment.Scenes
             if (m_appearance.Texture == null)
                 return;
 
-            LLQuaternion rot;
-            if (m_bodyRot != null)
-            {
-                rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
-            }
-            else
-            {
-                rot = LLQuaternion.Identity;
-            }
+            // Note: because LLQuaternion is a struct, it can't be null
+            LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
 
             remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
                                                             LocalId, m_pos, m_appearance.Texture.ToBytes(),
@@ -1682,15 +1675,8 @@ namespace OpenSim.Region.Environment.Scenes
             // Needed for standalone
             m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
 
-            LLQuaternion rot;
-            if (m_bodyRot != null)
-            {
-                rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
-            }
-            else
-            {
-                rot = LLQuaternion.Identity;
-            }
+            // Note: because LLQuaternion is a struct, it can't be null
+            LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
 
             m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId,
                                                m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
-- 
cgit v1.1