mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 05:17:24 +02:00
more correct comment
This commit is contained in:
parent
ffe69acb5c
commit
2c141fd555
1 changed files with 4 additions and 4 deletions
|
@ -149,10 +149,10 @@ void PhysicsEngine::removeObjects(const VectorOfMotionStates& objects) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_activeStaticBodies.size() > 0) {
|
if (_activeStaticBodies.size() > 0) {
|
||||||
// very unlikely to get here but its theoretically possible:
|
// _activeStaticBodies was not cleared last frame.
|
||||||
// immediately after a static entity was moved we skipped a simulation step and never got around to
|
// The only way to get here is if a static object were moved but we did not actually step the simulation last
|
||||||
// updating the static entity's RigidBody AABB. Now we're deleting bodies ==> we must scan
|
// frame (because the framerate is faster than our physics simulation rate). When this happens we must scan
|
||||||
// _activeStaticBodies for bodies being removed and clear any that we find.
|
// _activeStaticBodies for objects that were recently deleted so we don't try to access a dangling pointer.
|
||||||
for (auto object : objects) {
|
for (auto object : objects) {
|
||||||
btRigidBody* body = object->getRigidBody();
|
btRigidBody* body = object->getRigidBody();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue