aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs5
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs27
2 files changed, 28 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 9bf5bea..1c892fe 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1997,8 +1997,6 @@ namespace OpenSim.Region.Framework.Scenes
1997 if (part.SitTargetAvatar == UUID) 1997 if (part.SitTargetAvatar == UUID)
1998 part.SitTargetAvatar = UUID.Zero; 1998 part.SitTargetAvatar = UUID.Zero;
1999 1999
2000 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
2001
2002 ParentPosition = part.GetWorldPosition(); 2000 ParentPosition = part.GetWorldPosition();
2003 ControllingClient.SendClearFollowCamProperties(part.ParentUUID); 2001 ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
2004 } 2002 }
@@ -2052,6 +2050,9 @@ namespace OpenSim.Region.Framework.Scenes
2052 m_offsetRotation = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f); 2050 m_offsetRotation = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
2053 SendAvatarDataToAllAgents(); 2051 SendAvatarDataToAllAgents();
2054 m_requestedSitTargetID = 0; 2052 m_requestedSitTargetID = 0;
2053
2054 if (part != null)
2055 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
2055 } 2056 }
2056 2057
2057 Animator.UpdateMovementAnimations(); 2058 Animator.UpdateMovementAnimations();
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index f93d7ba..19d87c2 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -100,7 +100,14 @@ namespace OpenSim.Region.Physics.OdePlugin
100 private bool m_hackSentFall = false; 100 private bool m_hackSentFall = false;
101 private bool m_hackSentFly = false; 101 private bool m_hackSentFly = false;
102 private int m_requestedUpdateFrequency = 0; 102 private int m_requestedUpdateFrequency = 0;
103 private Vector3 m_taintPosition = Vector3.Zero; 103 private Vector3 m_taintPosition;
104
105 /// <summary>
106 /// Hold set forces so we can process them outside physics calculations. This prevents race conditions if we set force
107 /// while calculatios are going on
108 /// </summary>
109 private Vector3 m_taintForce;
110
104 internal uint m_localID = 0; 111 internal uint m_localID = 0;
105 // taints and their non-tainted counterparts 112 // taints and their non-tainted counterparts
106 private bool m_isPhysical = false; // the current physical status 113 private bool m_isPhysical = false; // the current physical status
@@ -832,7 +839,10 @@ namespace OpenSim.Region.Physics.OdePlugin
832 { 839 {
833 m_pidControllerActive = false; 840 m_pidControllerActive = false;
834 force *= 100f; 841 force *= 100f;
835 doForce(force); 842 m_taintForce += force;
843 _parent_scene.AddPhysicsActorTaint(this);
844
845 //doForce(force);
836 // If uncommented, things get pushed off world 846 // If uncommented, things get pushed off world
837 // 847 //
838 // m_log.Debug("Push!"); 848 // m_log.Debug("Push!");
@@ -1250,6 +1260,19 @@ namespace OpenSim.Region.Physics.OdePlugin
1250 } 1260 }
1251 } 1261 }
1252 1262
1263 if (m_taintForce != Vector3.Zero)
1264 {
1265 if (Body != IntPtr.Zero)
1266 {
1267 // FIXME: This is not a good solution since it's subject to a race condition if a force is another
1268 // thread sets a new force while we're in this loop (since it could be obliterated by
1269 // m_taintForce = Vector3.Zero. Need to lock ProcessTaints() when we set a new tainted force.
1270 doForce(m_taintForce);
1271 }
1272
1273 m_taintForce = Vector3.Zero;
1274 }
1275
1253 if (m_taintTargetVelocity != _target_velocity) 1276 if (m_taintTargetVelocity != _target_velocity)
1254 _target_velocity = m_taintTargetVelocity; 1277 _target_velocity = m_taintTargetVelocity;
1255 1278