Fix rigid body not resimulating after cache invalidation

Fix 9cd6b03187 introduced a bug that
prevented simulation after a cache invalidation (for instance when
changing a setting after simulating). This fixes that.
This commit is contained in:
2017-07-04 09:20:02 +02:00
parent 15fd758bd6
commit 3edc8c1f9b

View File

@@ -1515,8 +1515,10 @@ void BKE_rigidbody_aftertrans_update(Object *ob, float loc[3], float rot[3], flo
void BKE_rigidbody_cache_reset(RigidBodyWorld *rbw)
{
if (rbw)
if (rbw) {
rbw->pointcache->flag |= PTCACHE_OUTDATED;
rbw->ltime = rbw->pointcache->startframe;
}
}
/* ------------------ */