diff --git a/libraries/physics/src/PhysicsEngine.cpp b/libraries/physics/src/PhysicsEngine.cpp index 50290f6753..1d8e8190d1 100644 --- a/libraries/physics/src/PhysicsEngine.cpp +++ b/libraries/physics/src/PhysicsEngine.cpp @@ -12,11 +12,11 @@ // TODO: make MotionState able to clear incoming flags // TODO: make MotionState::setWorldTransform() put itself on _incomingChanges list // TODO: give PhysicsEngine instance an _entityPacketSender +// TODO: provide some sort of "reliable" send for "stopped" update #include "PhysicsEngine.h" #ifdef USE_BULLET_PHYSICS -#include "EntityMotionState.h" #include "ShapeInfoUtil.h" #include "ThreadSafeDynamicsWorld.h" @@ -75,7 +75,7 @@ void PhysicsEngine::removeEntityInternal(EntityItem* entity) { assert(entity); void* physicsInfo = entity->getPhysicsInfo(); if (physicsInfo) { - ObjectMotionState* motionState = static_cast(physicsInfo); + EntityMotionState* motionState = static_cast(physicsInfo); removeObject(motionState); entity->setPhysicsInfo(NULL); _entityMotionStates.remove(motionState); @@ -89,7 +89,7 @@ void PhysicsEngine::entityChangedInternal(EntityItem* entity) { void PhysicsEngine::clearEntitiesInternal() { // For now we assume this would only be called on shutdown in which case we can just let the memory get lost. - QSet::const_iterator stateItr = _entityMotionStates.begin(); + QSet::const_iterator stateItr = _entityMotionStates.begin(); for (stateItr = _entityMotionStates.begin(); stateItr != _entityMotionStates.end(); ++stateItr) { removeObject(*stateItr); } diff --git a/libraries/physics/src/PhysicsEngine.h b/libraries/physics/src/PhysicsEngine.h index c48ca8f7de..99a23a9b65 100644 --- a/libraries/physics/src/PhysicsEngine.h +++ b/libraries/physics/src/PhysicsEngine.h @@ -23,8 +23,7 @@ typedef unsigned int uint32_t; #include #include "BulletUtil.h" -#include "ObjectMotionState.h" -#include "ObjectMotionState.h" +#include "EntityMotionState.h" #include "PositionHashKey.h" #include "ShapeManager.h" #include "ThreadSafeDynamicsWorld.h" @@ -111,7 +110,7 @@ private: btHashMap _voxels; // EntitySimulation stuff - QSet _entityMotionStates; // all entities that we track + QSet _entityMotionStates; // all entities that we track QSet _incomingEntityChanges; // entities with pending physics changes by script or packet QSet _outgoingPhysics; // MotionStates with pending transform changes from physics simulation