Fix regression where sitting on ground stopped working.

This was due to the PhysicsActor no longer being recreated on stand from ground.
link-sitting
Justin Clark-Casey (justincc) 2013-11-29 01:56:49 +00:00
parent f9193e3c51
commit 868c0c2746
1 changed files with 11 additions and 8 deletions

View File

@ -2174,11 +2174,12 @@ namespace OpenSim.Region.Framework.Scenes
{ {
// m_log.DebugFormat("[SCENE PRESENCE]: StandUp() for {0}", Name); // m_log.DebugFormat("[SCENE PRESENCE]: StandUp() for {0}", Name);
bool satOnObject = IsSatOnObject;
SceneObjectPart part = ParentPart;
SitGround = false; SitGround = false;
if (ParentID != 0) if (satOnObject)
{ {
SceneObjectPart part = ParentPart;
TaskInventoryDictionary taskIDict = part.TaskInventory; TaskInventoryDictionary taskIDict = part.TaskInventory;
if (taskIDict != null) if (taskIDict != null)
{ {
@ -2238,18 +2239,20 @@ namespace OpenSim.Region.Framework.Scenes
Rotation = standRotation; Rotation = standRotation;
AbsolutePosition = standPos; AbsolutePosition = standPos;
ParentPosition = Vector3.Zero; ParentPosition = Vector3.Zero;
}
// We need to wait until we have calculated proper stand positions before sitting up the physical // We need to wait until we have calculated proper stand positions before sitting up the physical
// avatar to avoid race conditions. // avatar to avoid race conditions.
if (PhysicsActor == null) if (PhysicsActor == null)
AddToPhysicalScene(false); AddToPhysicalScene(false);
if (satOnObject)
{
SendAvatarDataToAllAgents(); SendAvatarDataToAllAgents();
m_requestedSitTargetID = 0; m_requestedSitTargetID = 0;
part.RemoveSittingAvatar(UUID); part.RemoveSittingAvatar(UUID);
if (part != null)
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
} }