Skip to content

Commit 04e4f51

Browse files
committed
force update of prev_decay_time
1 parent b217f0f commit 04e4f51

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/material.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,12 @@ void Material::Absorb(Material::Ptr mat) {
109109
if (ctx_ != NULL && ctx_->sim_info().decay != "never") {
110110
common_decay_time = ctx_->time();
111111
}
112-
this->Decay(common_decay_time);
113112
mat->Decay(common_decay_time);
113+
this->Decay(common_decay_time);
114+
115+
// manually update decay time in case the change was so small
116+
// that no decay was invoked
117+
this->prev_decay_time_ = common_decay_time;
114118

115119
// these calls force lazy evaluation if in lazy decay mode
116120
Composition::Ptr c0 = comp();

0 commit comments

Comments
 (0)