diff options
author | Luca Rood <dev@lucarood.com> | 2017-07-04 10:20:02 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-07-04 10:22:42 +0300 |
commit | 3edc8c1f9bc625547fc234b8dbe613f3b60c0eb4 (patch) | |
tree | 456aac0ec8dcf81da2faf8fcfcce4691693caf7a /source/blender | |
parent | 15fd758bd632fb37879b4c8cc3ff29f4305eae7e (diff) |
Fix rigid body not resimulating after cache invalidation
Fix 9cd6b03187b91bb2c267a45eac3cee7738e0e220 introduced a bug that
prevented simulation after a cache invalidation (for instance when
changing a setting after simulating). This fixes that.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index c4fb0aec97b..03977b2c9ae 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -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; + } } /* ------------------ */ |