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
7171 }
7272
7373 ObjectMotionState::~ObjectMotionState() {
74− // adebug TODO: move shape release out of PhysicsEngine and into into the ObjectMotionState dtor
7574 assert(!_body);
76− assert(!_shape);
75+ releaseShape();
76+ _type = MOTIONSTATE_TYPE_INVALID;
7777 }
7878
7979 void ObjectMotionState::setBodyLinearVelocity(const glm::vec3& velocity) const {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t