History

overhaul of MotionState cleanup

Moved MotionState deletes out of PhysicsEngine. EntityMotionStates are deleted by the PhysicsEntitySimulation. AvatarMotionStates are deleted in the Avatar dtor.

Andrew Meadows committed 10 years ago

Commit 6eb17701 parent 8886f4825 files · +158 −181Browse files

Showing the changes to libraries/physics/src/ObjectMotionState.cpp (1 of 25 files). Show all

Unified · Split

libraries/physics/src/ObjectMotionState.cpp+2−2
@@ -71,9 +71,9 @@ ObjectMotionState::ObjectMotionState(btCollisionShape* shape) : · 70 unmodified lines
71}71}
72 72
73ObjectMotionState::~ObjectMotionState() {73ObjectMotionState::~ObjectMotionState() {
74 // adebug TODO: move shape release out of PhysicsEngine and into into the ObjectMotionState dtor
75 assert(!_body);74 assert(!_body);
76 assert(!_shape);75 releaseShape();
76 _type = MOTIONSTATE_TYPE_INVALID;
77}77}
78 78
79void ObjectMotionState::setBodyLinearVelocity(const glm::vec3& velocity) const {79void ObjectMotionState::setBodyLinearVelocity(const glm::vec3& velocity) const {