fix extremely minor Ode bug where the _taintedPrimL list would always be cleared on every OdeScene.Simulate() even if it was already empty.

bulletsim
Justin Clark-Casey (justincc) 2011-07-29 01:18:42 +01:00
parent 2a39d0cdb0
commit f3c5a5b745
1 changed files with 14 additions and 3 deletions

View File

@ -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
@ -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);
}
}
/// <summary>
/// Simulate the joint proxies of a NINJA actor.
/// </summary>
/// <remarks>
/// Called as part of the Simulate() loop if NINJA physics is active. Must only be called from there.
/// </remarks>
/// <param name="actor"></param>
protected void SimulateActorPendingJoints(OdePrim actor)
{
// If an actor moved, move its joint proxy objects as well.