aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-31 17:13:53 +0100
committerJustin Clark-Casey (justincc)2011-08-31 17:13:53 +0100
commit899d109e822bbf6084714842b460858f3939840b (patch)
treee6a942ef94a90525b329d9bafb28168fb41d242f /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentIn WorldCommModule, replace the useless Attachments == null check with Attach... (diff)
downloadopensim-SC_OLD-899d109e822bbf6084714842b460858f3939840b.zip
opensim-SC_OLD-899d109e822bbf6084714842b460858f3939840b.tar.gz
opensim-SC_OLD-899d109e822bbf6084714842b460858f3939840b.tar.bz2
opensim-SC_OLD-899d109e822bbf6084714842b460858f3939840b.tar.xz
get rid of appearance null checks - this is never null
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs50
1 files changed, 15 insertions, 35 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 43a845c..cda2006 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -885,11 +885,8 @@ namespace OpenSim.Region.Framework.Scenes
885 } 885 }
886 886
887 float localAVHeight = 1.56f; 887 float localAVHeight = 1.56f;
888 if (m_appearance != null) 888 if (m_appearance.AvatarHeight > 0)
889 { 889 localAVHeight = m_appearance.AvatarHeight;
890 if (m_appearance.AvatarHeight > 0)
891 localAVHeight = m_appearance.AvatarHeight;
892 }
893 890
894 float posZLimit = 0; 891 float posZLimit = 0;
895 892
@@ -903,25 +900,10 @@ namespace OpenSim.Region.Framework.Scenes
903 } 900 }
904 AbsolutePosition = pos; 901 AbsolutePosition = pos;
905 902
906 if (m_appearance != null) 903 if (m_appearance.AvatarHeight > 0)
907 { 904 SetHeight(m_appearance.AvatarHeight);
908 if (m_appearance.AvatarHeight > 0)
909 SetHeight(m_appearance.AvatarHeight);
910 }
911 else
912 {
913 m_log.ErrorFormat("[SCENE PRESENCE]: null appearance in MakeRoot in {0}", Scene.RegionInfo.RegionName);
914 // emergency; this really shouldn't happen
915 m_appearance = new AvatarAppearance();
916 }
917
918 AddToPhysicalScene(isFlying);
919 905
920 if (m_appearance != null) 906 AddToPhysicalScene(isFlying);
921 {
922 if (m_appearance.AvatarHeight > 0)
923 SetHeight(m_appearance.AvatarHeight);
924 }
925 907
926 if (m_forceFly) 908 if (m_forceFly)
927 { 909 {
@@ -1053,11 +1035,10 @@ namespace OpenSim.Region.Framework.Scenes
1053 Velocity = Vector3.Zero; 1035 Velocity = Vector3.Zero;
1054 AbsolutePosition = pos; 1036 AbsolutePosition = pos;
1055 AddToPhysicalScene(isFlying); 1037 AddToPhysicalScene(isFlying);
1056 if (m_appearance != null) 1038
1057 { 1039 // FIXME: Move me into AddToPhysicalScene
1058 if (m_appearance.AvatarHeight > 0) 1040 if (m_appearance.AvatarHeight > 0)
1059 SetHeight(m_appearance.AvatarHeight); 1041 SetHeight(m_appearance.AvatarHeight);
1060 }
1061 1042
1062 SendTerseUpdateToAllClients(); 1043 SendTerseUpdateToAllClients();
1063 } 1044 }
@@ -1071,11 +1052,9 @@ namespace OpenSim.Region.Framework.Scenes
1071 RemoveFromPhysicalScene(); 1052 RemoveFromPhysicalScene();
1072 AbsolutePosition = pos; 1053 AbsolutePosition = pos;
1073 AddToPhysicalScene(isFlying); 1054 AddToPhysicalScene(isFlying);
1074 if (m_appearance != null) 1055
1075 { 1056 if (m_appearance.AvatarHeight > 0)
1076 if (m_appearance.AvatarHeight > 0) 1057 SetHeight(m_appearance.AvatarHeight);
1077 SetHeight(m_appearance.AvatarHeight);
1078 }
1079 1058
1080 SendTerseUpdateToAllClients(); 1059 SendTerseUpdateToAllClients();
1081 } 1060 }
@@ -1129,7 +1108,7 @@ namespace OpenSim.Region.Framework.Scenes
1129 #region Event Handlers 1108 #region Event Handlers
1130 1109
1131 /// <summary> 1110 /// <summary>
1132 /// Sets avatar height in the phyiscs plugin 1111 /// Sets avatar height in the physics plugin
1133 /// </summary> 1112 /// </summary>
1134 public void SetHeight(float height) 1113 public void SetHeight(float height)
1135 { 1114 {
@@ -1846,7 +1825,8 @@ namespace OpenSim.Region.Framework.Scenes
1846 m_parentID = 0; 1825 m_parentID = 0;
1847 SendAvatarDataToAllAgents(); 1826 SendAvatarDataToAllAgents();
1848 m_requestedSitTargetID = 0; 1827 m_requestedSitTargetID = 0;
1849 if (m_physicsActor != null && m_appearance != null) 1828
1829 if (m_physicsActor != null)
1850 { 1830 {
1851 if (m_appearance.AvatarHeight > 0) 1831 if (m_appearance.AvatarHeight > 0)
1852 SetHeight(m_appearance.AvatarHeight); 1832 SetHeight(m_appearance.AvatarHeight);