Merge branch 'master' into bigmerge

avinationmerge
Melanie 2011-11-04 23:21:19 +00:00
commit b9f7aebde3
2 changed files with 28 additions and 4 deletions

View File

@ -1997,8 +1997,6 @@ namespace OpenSim.Region.Framework.Scenes
if (part.SitTargetAvatar == UUID)
part.SitTargetAvatar = UUID.Zero;
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
ParentPosition = part.GetWorldPosition();
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
}
@ -2052,6 +2050,9 @@ namespace OpenSim.Region.Framework.Scenes
m_offsetRotation = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
SendAvatarDataToAllAgents();
m_requestedSitTargetID = 0;
if (part != null)
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
}
Animator.UpdateMovementAnimations();

View File

@ -100,7 +100,14 @@ namespace OpenSim.Region.Physics.OdePlugin
private bool m_hackSentFall = false;
private bool m_hackSentFly = false;
private int m_requestedUpdateFrequency = 0;
private Vector3 m_taintPosition = Vector3.Zero;
private Vector3 m_taintPosition;
/// <summary>
/// Hold set forces so we can process them outside physics calculations. This prevents race conditions if we set force
/// while calculatios are going on
/// </summary>
private Vector3 m_taintForce;
internal uint m_localID = 0;
// taints and their non-tainted counterparts
private bool m_isPhysical = false; // the current physical status
@ -832,7 +839,10 @@ namespace OpenSim.Region.Physics.OdePlugin
{
m_pidControllerActive = false;
force *= 100f;
doForce(force);
m_taintForce += force;
_parent_scene.AddPhysicsActorTaint(this);
//doForce(force);
// If uncommented, things get pushed off world
//
// m_log.Debug("Push!");
@ -1250,6 +1260,19 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
if (m_taintForce != Vector3.Zero)
{
if (Body != IntPtr.Zero)
{
// FIXME: This is not a good solution since it's subject to a race condition if a force is another
// thread sets a new force while we're in this loop (since it could be obliterated by
// m_taintForce = Vector3.Zero. Need to lock ProcessTaints() when we set a new tainted force.
doForce(m_taintForce);
}
m_taintForce = Vector3.Zero;
}
if (m_taintTargetVelocity != _target_velocity)
_target_velocity = m_taintTargetVelocity;