From 2a2cdaa211086b48c1a19f371b544e1550500e33 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 11 Nov 2011 23:10:43 +0000 Subject: As with prim sitting avatars, make an avatar phantom when it sits on the ground and solid again when it stands. This is to avoid http://opensimulator.org/mantis/view.php?id=5783 when a collision with a ground sitting avatar causes that avatar to automatically stand and sometimes not be able to move A better solution may be to keep gound sitting avatars solid but remove their collision status. However, this requires some physics code work. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0c20045..f5a7f02 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1419,6 +1419,7 @@ namespace OpenSim.Region.Framework.Scenes // to use. Or we could add a m_isSitting variable. //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); SitGround = true; + RemoveFromPhysicalScene(); } // In the future, these values might need to go global. @@ -1835,11 +1836,14 @@ namespace OpenSim.Region.Framework.Scenes /// public void StandUp() { +// m_log.DebugFormat("[SCENE PRESENCE]: StandUp() for {0}", Name); + SitGround = false; + if (PhysicsActor == null) + AddToPhysicalScene(false); if (ParentID != 0) { -// m_log.Debug("StandupCode Executed"); SceneObjectPart part = m_scene.GetSceneObjectPart(ParentID); if (part != null) { @@ -1866,11 +1870,6 @@ namespace OpenSim.Region.Framework.Scenes ControllingClient.SendClearFollowCamProperties(part.ParentUUID); } - if (PhysicsActor == null) - { - AddToPhysicalScene(false); - } - m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight); ParentPosition = Vector3.Zero; -- cgit v1.1