void AvatarManager::handleProcessedPhysicsTransaction(PhysicsEngine::Transaction& transaction) { // things on objectsToRemove are ready for delete for (auto object : transaction.objectsToRemove) { delete object; } transaction.clear(); }
void AvatarManager::handleProcessedPhysicsTransaction(PhysicsEngine::Transaction& transaction) { // things on objectsToChange correspond to failed changes // so we push them back onto _avatarsToChangeInPhysics for (auto object : transaction.objectsToChange) { AvatarMotionState* motionState = static_cast<AvatarMotionState*>(object); assert(motionState); assert(motionState->_avatar); _avatarsToChangeInPhysics.insert(motionState->_avatar); } // things on objectsToRemove are ready for delete for (auto object : transaction.objectsToRemove) { delete object; } transaction.clear(); }