History

remove unneeded lock around action-data in entity item. Actions now use a weak pointer to keep track of owner entity

Seth Alves committed 11 years ago

Commit 30be5151 parent 5ecc39b9 files · +25 −36Browse files

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

Unified · Split

libraries/physics/src/ObjectActionSpring.cpp+6−1
@@ -33,7 +33,12 @@ void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) { · 32 unmodified lines
33 return;33 return;
34 }34 }
35 35
36 void* physicsInfo = _ownerEntity->getPhysicsInfo();36 auto ownerEntity = _ownerEntity.lock();
37 if (!ownerEntity) {
38 return;
39 }
40
41 void* physicsInfo = ownerEntity->getPhysicsInfo();
37 if (!physicsInfo) {42 if (!physicsInfo) {
38 unlock();43 unlock();
39 return;44 return;