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) if (prim.m_taintremove)
{ {
//Console.WriteLine("Simulate calls RemovePrimThreadLocked"); // Console.WriteLine("Simulate calls RemovePrimThreadLocked for {0}", prim.Name);
RemovePrimThreadLocked(prim); RemovePrimThreadLocked(prim);
} }
else else
{ {
//Console.WriteLine("Simulate calls ProcessTaints"); // Console.WriteLine("Simulate calls ProcessTaints for {0}", prim.Name);
prim.ProcessTaints(timeStep); prim.ProcessTaints(timeStep);
} }
processedtaints = true; processedtaints = true;
prim.m_collisionscore = 0; prim.m_collisionscore = 0;
@ -2741,10 +2742,12 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
SimulatePendingNINJAJoints(); SimulatePendingNINJAJoints();
if (processedtaints) if (processedtaints)
{
//Console.WriteLine("Simulate calls Clear of _taintedPrim list"); //Console.WriteLine("Simulate calls Clear of _taintedPrim list");
_taintedPrimH.Clear(); _taintedPrimH.Clear();
_taintedPrimL.Clear(); _taintedPrimL.Clear();
} }
}
// Move characters // Move characters
lock (_characters) lock (_characters)
@ -3096,6 +3099,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
DoJointErrorMessage(joint, "joint could not yet be created; still pending"); DoJointErrorMessage(joint, "joint could not yet be created; still pending");
} }
} }
foreach (PhysicsJoint successfullyProcessedJoint in successfullyProcessedPendingJoints) foreach (PhysicsJoint successfullyProcessedJoint in successfullyProcessedPendingJoints)
{ {
//DoJointErrorMessage(successfullyProcessedJoint, "finalizing succesfully procsssed joint " + successfullyProcessedJoint.ObjectNameInScene + " parms " + successfullyProcessedJoint.RawParams); //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) protected void SimulateActorPendingJoints(OdePrim actor)
{ {
// If an actor moved, move its joint proxy objects as well. // If an actor moved, move its joint proxy objects as well.