remove ragdoll from simulation in dtor

This commit is contained in:
Andrew Meadows 2014-08-14 09:20:53 -07:00
parent 395f643f1b
commit ee0d0a1566

View file

@ -24,6 +24,9 @@ Ragdoll::Ragdoll() : _massScale(1.0f), _ragdollTranslation(0.0f), _translationIn
Ragdoll::~Ragdoll() {
clearRagdollConstraintsAndPoints();
if (_ragdollSimulation) {
_ragdollSimulation->removeRagdoll(this);
}
}
void Ragdoll::stepRagdollForward(float deltaTime) {