mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Fix effects not being removed from scene graph
This commit is contained in:
parent
f53bc7807a
commit
9559feaa90
@ -66,10 +66,13 @@ void EffectManager::update(float dt)
|
||||
std::remove_if(
|
||||
mEffects.begin(),
|
||||
mEffects.end(),
|
||||
[dt](Effect& effect)
|
||||
[dt, this](Effect& effect)
|
||||
{
|
||||
effect.mAnimTime->addTime(dt);
|
||||
return effect.mAnimTime->getTime() >= effect.mMaxControllerLength;
|
||||
const auto remove = effect.mAnimTime->getTime() >= effect.mMaxControllerLength;
|
||||
if (remove)
|
||||
mParentNode->removeChild(effect.mTransform);
|
||||
return remove;
|
||||
}),
|
||||
mEffects.end()
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user