aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2008-07-23 12:39:16 +0000
committerSean Dague2008-07-23 12:39:16 +0000
commit9e8b456bbc5d96f33bc30e1c28fb2102d13445af (patch)
tree83e918a2ac905d17f78c4aea0b20378a88777928
parentChanged it so the avatar's rotation is now sent as part of a full avatar upda... (diff)
downloadopensim-SC_OLD-9e8b456bbc5d96f33bc30e1c28fb2102d13445af.zip
opensim-SC_OLD-9e8b456bbc5d96f33bc30e1c28fb2102d13445af.tar.gz
opensim-SC_OLD-9e8b456bbc5d96f33bc30e1c28fb2102d13445af.tar.bz2
opensim-SC_OLD-9e8b456bbc5d96f33bc30e1c28fb2102d13445af.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs22
1 files changed, 4 insertions, 18 deletions
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
1618 if (m_appearance.Texture == null) 1618 if (m_appearance.Texture == null)
1619 return; 1619 return;
1620 1620
1621 LLQuaternion rot; 1621 // Note: because LLQuaternion is a struct, it can't be null
1622 if (m_bodyRot != null) 1622 LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
1623 {
1624 rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
1625 }
1626 else
1627 {
1628 rot = LLQuaternion.Identity;
1629 }
1630 1623
1631 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, 1624 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
1632 LocalId, m_pos, m_appearance.Texture.ToBytes(), 1625 LocalId, m_pos, m_appearance.Texture.ToBytes(),
@@ -1682,15 +1675,8 @@ namespace OpenSim.Region.Environment.Scenes
1682 // Needed for standalone 1675 // Needed for standalone
1683 m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); 1676 m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
1684 1677
1685 LLQuaternion rot; 1678 // Note: because LLQuaternion is a struct, it can't be null
1686 if (m_bodyRot != null) 1679 LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
1687 {
1688 rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
1689 }
1690 else
1691 {
1692 rot = LLQuaternion.Identity;
1693 }
1694 1680
1695 m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, 1681 m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId,
1696 m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot); 1682 m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);