aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs35
1 files changed, 11 insertions, 24 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index d01cac2..ce9cf0c 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -171,9 +171,6 @@ namespace OpenSim.Region.Framework.Scenes
171 171
172 private float m_health = 100f; 172 private float m_health = 100f;
173 173
174 // Default AV Height
175 private float m_avHeight = 127.0f;
176
177 protected RegionInfo m_regionInfo; 174 protected RegionInfo m_regionInfo;
178 protected ulong crossingFromRegion; 175 protected ulong crossingFromRegion;
179 176
@@ -841,9 +838,10 @@ namespace OpenSim.Region.Framework.Scenes
841 } 838 }
842 839
843 float localAVHeight = 1.56f; 840 float localAVHeight = 1.56f;
844 if (m_avHeight != 127.0f) 841 if (m_appearance != null)
845 { 842 {
846 localAVHeight = m_avHeight; 843 if (m_appearance.AvatarHeight > 0)
844 localAVHeight = m_appearance.AvatarHeight;
847 } 845 }
848 846
849 float posZLimit = 0; 847 float posZLimit = 0;
@@ -1066,10 +1064,9 @@ namespace OpenSim.Region.Framework.Scenes
1066 /// </summary> 1064 /// </summary>
1067 public void SetHeight(float height) 1065 public void SetHeight(float height)
1068 { 1066 {
1069 m_avHeight = height;
1070 if (PhysicsActor != null && !IsChildAgent) 1067 if (PhysicsActor != null && !IsChildAgent)
1071 { 1068 {
1072 Vector3 SetSize = new Vector3(0.45f, 0.6f, m_avHeight); 1069 Vector3 SetSize = new Vector3(0.45f, 0.6f, height);
1073 PhysicsActor.Size = SetSize; 1070 PhysicsActor.Size = SetSize;
1074 } 1071 }
1075 } 1072 }
@@ -1693,9 +1690,10 @@ namespace OpenSim.Region.Framework.Scenes
1693 m_parentID = 0; 1690 m_parentID = 0;
1694 SendFullUpdateToAllClients(); 1691 SendFullUpdateToAllClients();
1695 m_requestedSitTargetID = 0; 1692 m_requestedSitTargetID = 0;
1696 if ((m_physicsActor != null) && (m_avHeight > 0)) 1693 if (m_physicsActor != null && m_appearance != null)
1697 { 1694 {
1698 SetHeight(m_avHeight); 1695 if (m_appearance.AvatarHeight > 0)
1696 SetHeight(m_appearance.AvatarHeight);
1699 } 1697 }
1700 } 1698 }
1701 1699
@@ -2585,7 +2583,7 @@ namespace OpenSim.Region.Framework.Scenes
2585 cadu.ActiveGroupID = UUID.Zero.Guid; 2583 cadu.ActiveGroupID = UUID.Zero.Guid;
2586 cadu.AgentID = UUID.Guid; 2584 cadu.AgentID = UUID.Guid;
2587 cadu.alwaysrun = m_setAlwaysRun; 2585 cadu.alwaysrun = m_setAlwaysRun;
2588 cadu.AVHeight = m_avHeight; 2586 cadu.AVHeight = m_appearance.AvatarHeight;
2589 Vector3 tempCameraCenter = m_CameraCenter; 2587 Vector3 tempCameraCenter = m_CameraCenter;
2590 cadu.cameraPosition = tempCameraCenter; 2588 cadu.cameraPosition = tempCameraCenter;
2591 cadu.drawdistance = m_DrawDistance; 2589 cadu.drawdistance = m_DrawDistance;
@@ -2921,7 +2919,6 @@ namespace OpenSim.Region.Framework.Scenes
2921 2919
2922 m_CameraCenter = cAgentData.Center + offset; 2920 m_CameraCenter = cAgentData.Center + offset;
2923 2921
2924 m_avHeight = cAgentData.Size.Z;
2925 //SetHeight(cAgentData.AVHeight); 2922 //SetHeight(cAgentData.AVHeight);
2926 2923
2927 if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) 2924 if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0)
@@ -2946,8 +2943,6 @@ namespace OpenSim.Region.Framework.Scenes
2946 cAgent.Position = AbsolutePosition; 2943 cAgent.Position = AbsolutePosition;
2947 cAgent.Velocity = m_velocity; 2944 cAgent.Velocity = m_velocity;
2948 cAgent.Center = m_CameraCenter; 2945 cAgent.Center = m_CameraCenter;
2949 // Don't copy the size; it is inferred from apearance parameters
2950 //cAgent.Size = new Vector3(0, 0, m_avHeight);
2951 cAgent.AtAxis = m_CameraAtAxis; 2946 cAgent.AtAxis = m_CameraAtAxis;
2952 cAgent.LeftAxis = m_CameraLeftAxis; 2947 cAgent.LeftAxis = m_CameraLeftAxis;
2953 cAgent.UpAxis = m_CameraUpAxis; 2948 cAgent.UpAxis = m_CameraUpAxis;
@@ -3065,7 +3060,6 @@ namespace OpenSim.Region.Framework.Scenes
3065 m_pos = cAgent.Position; 3060 m_pos = cAgent.Position;
3066 m_velocity = cAgent.Velocity; 3061 m_velocity = cAgent.Velocity;
3067 m_CameraCenter = cAgent.Center; 3062 m_CameraCenter = cAgent.Center;
3068 //m_avHeight = cAgent.Size.Z;
3069 m_CameraAtAxis = cAgent.AtAxis; 3063 m_CameraAtAxis = cAgent.AtAxis;
3070 m_CameraLeftAxis = cAgent.LeftAxis; 3064 m_CameraLeftAxis = cAgent.LeftAxis;
3071 m_CameraUpAxis = cAgent.UpAxis; 3065 m_CameraUpAxis = cAgent.UpAxis;
@@ -3198,16 +3192,9 @@ namespace OpenSim.Region.Framework.Scenes
3198 Vector3 pVec = AbsolutePosition; 3192 Vector3 pVec = AbsolutePosition;
3199 3193
3200 // Old bug where the height was in centimeters instead of meters 3194 // Old bug where the height was in centimeters instead of meters
3201 if (m_avHeight == 127.0f) 3195 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec,
3202 { 3196 new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying);
3203 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new Vector3(0f, 0f, 1.56f), 3197
3204 isFlying);
3205 }
3206 else
3207 {
3208 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec,
3209 new Vector3(0f, 0f, m_avHeight), isFlying);
3210 }
3211 scene.AddPhysicsActorTaint(m_physicsActor); 3198 scene.AddPhysicsActorTaint(m_physicsActor);
3212 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; 3199 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
3213 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; 3200 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;