aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs50
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs1
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs1
3 files changed, 17 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);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index 35b41fb..ce9d418 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -357,6 +357,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
357 agent.InventoryFolder = UUID.Zero; 357 agent.InventoryFolder = UUID.Zero;
358 agent.startpos = Vector3.Zero; 358 agent.startpos = Vector3.Zero;
359 agent.CapsPath = GetRandomCapsObjectPath(); 359 agent.CapsPath = GetRandomCapsObjectPath();
360 agent.Appearance = new AvatarAppearance();
360 361
361 acd1 = agent; 362 acd1 = agent;
362 } 363 }
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index 2cf40d7..ea433a6 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -357,6 +357,7 @@ namespace OpenSim.Tests.Common
357 agentData.startpos = Vector3.Zero; 357 agentData.startpos = Vector3.Zero;
358 agentData.CapsPath = "http://wibble.com"; 358 agentData.CapsPath = "http://wibble.com";
359 agentData.ServiceURLs = new Dictionary<string, object>(); 359 agentData.ServiceURLs = new Dictionary<string, object>();
360 agentData.Appearance = new AvatarAppearance();
360 361
361 return agentData; 362 return agentData;
362 } 363 }