From 7d551e27cac7cba3c475ec7e528897834552b36f Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 3 Nov 2010 00:01:47 +0000 Subject: Trying to prevent a wrong physical actor size --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ce9cf0c..a339a4f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3187,6 +3187,9 @@ namespace OpenSim.Region.Framework.Scenes /// public void AddToPhysicalScene(bool isFlying) { + if (m_appearance.AvatarHeight == 0) + return; + PhysicsScene scene = m_scene.PhysicsScene; Vector3 pVec = AbsolutePosition; -- cgit v1.1 From 57eabe9d4625a7f91a48525f83233a5a617c5a24 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 3 Nov 2010 00:47:22 +0000 Subject: Actually calculate the height before setting it, this isn't done automatically on incoming transfers in all cases. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a339a4f..964f8cb 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3078,6 +3078,12 @@ namespace OpenSim.Region.Framework.Scenes m_setAlwaysRun = cAgent.AlwaysRun; m_appearance = new AvatarAppearance(cAgent.Appearance); + if (m_physicsActor != null) + { + bool isFlying = m_physicsActor.Flying; + RemoveFromPhysicalScene(); + AddToPhysicalScene(isFlying); + } /* uint i = 0; @@ -3188,7 +3194,7 @@ namespace OpenSim.Region.Framework.Scenes public void AddToPhysicalScene(bool isFlying) { if (m_appearance.AvatarHeight == 0) - return; + m_appearance.SetHeight(); PhysicsScene scene = m_scene.PhysicsScene; -- cgit v1.1