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:
Luca Rood 2017-07-04 09:20:02 +02:00
parent 15fd758bd6
commit 3edc8c1f9b
Notes: blender-bot 2023-02-14 06:41:45 +01:00
Referenced by issue #52374, Changes of rigid body related settings during simulation will break the simulation (worked in 2.78c)
1 changed files with 3 additions and 1 deletions

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;
}
}
/* ------------------ */