From f3c5a5b745eb134d3dbd63012df3e5f5e964e71c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 29 Jul 2011 01:18:42 +0100
Subject: fix extremely minor Ode bug where the _taintedPrimL list would always
be cleared on every OdeScene.Simulate() even if it was already empty.
---
OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index c436fca..cd2b156 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -2719,14 +2719,15 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
{
if (prim.m_taintremove)
{
- //Console.WriteLine("Simulate calls RemovePrimThreadLocked");
+// Console.WriteLine("Simulate calls RemovePrimThreadLocked for {0}", prim.Name);
RemovePrimThreadLocked(prim);
}
else
{
- //Console.WriteLine("Simulate calls ProcessTaints");
+// Console.WriteLine("Simulate calls ProcessTaints for {0}", prim.Name);
prim.ProcessTaints(timeStep);
}
+
processedtaints = true;
prim.m_collisionscore = 0;
@@ -2741,9 +2742,11 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
SimulatePendingNINJAJoints();
if (processedtaints)
+ {
//Console.WriteLine("Simulate calls Clear of _taintedPrim list");
_taintedPrimH.Clear();
_taintedPrimL.Clear();
+ }
}
// Move characters
@@ -2839,7 +2842,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
{
if (actor.bad)
m_log.WarnFormat("[PHYSICS]: BAD Actor {0} in _characters list was not removed?", actor.m_uuid);
-
+
actor.UpdatePositionAndVelocity();
}
}
@@ -3096,6 +3099,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
DoJointErrorMessage(joint, "joint could not yet be created; still pending");
}
}
+
foreach (PhysicsJoint successfullyProcessedJoint in successfullyProcessedPendingJoints)
{
//DoJointErrorMessage(successfullyProcessedJoint, "finalizing succesfully procsssed joint " + successfullyProcessedJoint.ObjectNameInScene + " parms " + successfullyProcessedJoint.RawParams);
@@ -3108,6 +3112,13 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
}
}
+ ///
+ /// Simulate the joint proxies of a NINJA actor.
+ ///
+ ///
+ /// Called as part of the Simulate() loop if NINJA physics is active. Must only be called from there.
+ ///
+ ///
protected void SimulateActorPendingJoints(OdePrim actor)
{
// If an actor moved, move its joint proxy objects as well.
--
cgit v1.1