From 868c0c27469067d25add501569e5fb12f8a79c12 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 29 Nov 2013 01:56:49 +0000 Subject: [PATCH] Fix regression where sitting on ground stopped working. This was due to the PhysicsActor no longer being recreated on stand from ground. --- .../Region/Framework/Scenes/ScenePresence.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a52263bb6a..0fb5477b9a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2174,11 +2174,12 @@ namespace OpenSim.Region.Framework.Scenes { // m_log.DebugFormat("[SCENE PRESENCE]: StandUp() for {0}", Name); + bool satOnObject = IsSatOnObject; + SceneObjectPart part = ParentPart; SitGround = false; - if (ParentID != 0) + if (satOnObject) { - SceneObjectPart part = ParentPart; TaskInventoryDictionary taskIDict = part.TaskInventory; if (taskIDict != null) { @@ -2238,19 +2239,21 @@ namespace OpenSim.Region.Framework.Scenes Rotation = standRotation; AbsolutePosition = standPos; ParentPosition = Vector3.Zero; + } - // We need to wait until we have calculated proper stand positions before sitting up the physical - // avatar to avoid race conditions. - if (PhysicsActor == null) - AddToPhysicalScene(false); + // We need to wait until we have calculated proper stand positions before sitting up the physical + // avatar to avoid race conditions. + if (PhysicsActor == null) + AddToPhysicalScene(false); + if (satOnObject) + { SendAvatarDataToAllAgents(); m_requestedSitTargetID = 0; part.RemoveSittingAvatar(UUID); - if (part != null) - part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); + part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); } Animator.TrySetMovementAnimation("STAND");