cleanup and removing some accidental C++-20-isms

This commit is contained in:
Andrew Meadows 2019-05-03 14:48:10 -07:00
parent e770bd6142
commit f6916edac4
3 changed files with 3 additions and 21 deletions
interface/src/avatar
libraries
entities/src
physics/src

View file

@ -427,8 +427,6 @@ DetailedMotionState* AvatarManager::createDetailedMotionState(OtherAvatarPointer
std::vector<int32_t> boundJoints;
const btCollisionShape* shape = avatar->createCollisionShape(jointIndex, isBound, boundJoints);
if (shape) {
//std::shared_ptr<OtherAvatar> avatar = shared_from_this();
//std::shared_ptr<Avatar> avatar = getThisPointer();
DetailedMotionState* motionState = new DetailedMotionState(avatar, shape, jointIndex);
motionState->setMass(0.0f); // DetailedMotionState has KINEMATIC MotionType, so zero mass is ok
motionState->setIsBound(isBound, boundJoints);
@ -514,7 +512,7 @@ void AvatarManager::buildPhysicsTransaction(PhysicsEngine::Transaction& transact
if (flags & EASY_DIRTY_PHYSICS_FLAGS) {
motionState->handleEasyChanges(flags);
}
// NOTE: we don't call detailedMotionState->handleEasyChanges() here is because they are KINEMATIC
// NOTE: we don't call detailedMotionState->handleEasyChanges() here because they are KINEMATIC
// and Bullet will automagically call DetailedMotionState::getWorldTransform() on all that are active.
if (flags & (Simulation::DIRTY_MOTION_TYPE | Simulation::DIRTY_COLLISION_GROUP)) {

View file

@ -192,22 +192,6 @@ void EntitySimulation::processChangedEntities() {
void EntitySimulation::processChangedEntity(const EntityItemPointer& entity) {
uint32_t dirtyFlags = entity->getDirtyFlags();
/* TODO? maybe add to _entitiesToSort when DIRTY_POSITION is set?
// Although it is not the responsibility of the EntitySimulation to sort the tree for EXTERNAL changes
// it IS responsibile for triggering deletes for entities that leave the bounds of the domain, hence
// we must check for that case here, however we rely on the change event to have set DIRTY_POSITION flag.
if (dirtyFlags & Simulation::DIRTY_POSITION) {
AACube domainBounds(glm::vec3((float)-HALF_TREE_SCALE), (float)TREE_SCALE);
bool success;
AACube newCube = entity->getQueryAACube(success);
if (success && !domainBounds.touches(newCube)) {
qCDebug(entities) << "Entity " << entity->getEntityItemID() << " moved out of domain bounds.";
entity->die();
prepareEntityForDelete(entity);
return;
}
}
*/
if (dirtyFlags & (Simulation::DIRTY_LIFETIME | Simulation::DIRTY_UPDATEABLE)) {
if (dirtyFlags & Simulation::DIRTY_LIFETIME) {

View file

@ -104,8 +104,8 @@ private:
ShapeFactory::Worker* _deadWorker { nullptr };
TimePoint _nextOrphanExpiry;
uint32_t _ringIndex { 0 };
std::atomic_uint32_t _workRequestCount { 0 };
std::atomic_uint32_t _workDeliveryCount { 0 };
std::atomic_uint _workRequestCount { 0 };
std::atomic_uint _workDeliveryCount { 0 };
};
#endif // hifi_ShapeManager_h