mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-20 12:19:10 +00:00
Rework PhysX collision flutter bug workaround
To better handle erroneous trigger events under the new timing method, use the number of times the simulation has actually advanced instead of the number of evals received. Cleaned up a bit.
This commit is contained in:
@ -355,6 +355,7 @@ plSimulationMgr::plSimulationMgr()
|
||||
, fMaxDelta(kDefaultMaxDelta)
|
||||
, fStepSize(kDefaultStepSize)
|
||||
, fAccumulator(0.0f)
|
||||
, fStepCount(0)
|
||||
, fLOSDispatch(TRACKED_NEW plLOSDispatch())
|
||||
, fSoundMgr(new plPhysicsSoundMgr)
|
||||
, fLog(nil)
|
||||
@ -609,6 +610,8 @@ void plSimulationMgr::Advance(float delSecs)
|
||||
fAccumulator = fMaxDelta;
|
||||
}
|
||||
|
||||
++fStepCount;
|
||||
|
||||
// Perform as many whole substeps as possible saving the remainder in our accumulator.
|
||||
int numSubSteps = (int)(fAccumulator / fStepSize + 0.000001f);
|
||||
float delta = numSubSteps * fStepSize;
|
||||
|
Reference in New Issue
Block a user