catchup previous commits

This commit is contained in:
Bruno Herbelin
2021-12-20 00:28:12 +01:00
parent a3a581794e
commit cb3cca8a64
2 changed files with 4 additions and 7 deletions

View File

@@ -91,21 +91,18 @@ void Node::copyTransform(const Node *other)
void Node::update( float dt) void Node::update( float dt)
{ {
std::list<UpdateCallback *>::iterator iter; for (auto iter=update_callbacks_.begin(); iter != update_callbacks_.end(); )
for (iter=update_callbacks_.begin(); iter != update_callbacks_.end(); )
{ {
UpdateCallback *callback = *iter; UpdateCallback *callback = *iter;
if (callback->enabled()) callback->update(this, dt);
callback->update(this, dt);
if (callback->finished()) { if (callback->finished()) {
iter = update_callbacks_.erase(iter); iter = update_callbacks_.erase(iter);
delete callback; delete callback;
} }
else { else
++iter; ++iter;
}
} }
// update transform matrix from attributes // update transform matrix from attributes

View File

@@ -132,7 +132,7 @@ void Session::update(float dt)
// render the source // render the source
(*it)->render(); (*it)->render();
// update the source // update the source
(*it)->setActive( (*it)->mix_distance() < activation_threshold_); (*it)->setActive(activation_threshold_);
(*it)->update(dt); (*it)->update(dt);
} }
} }