mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 21:45:33 +00:00
Fix weather particles not being cleared when changing from one particle effect to another
This commit is contained in:
parent
ab2df963e9
commit
bd1f3493d7
1 changed files with 8 additions and 2 deletions
|
@ -1432,6 +1432,14 @@ void SkyManager::setWeather(const WeatherResult& weather)
|
|||
{
|
||||
mCurrentParticleEffect = weather.mParticleEffect;
|
||||
|
||||
// cleanup old particles
|
||||
if (mParticleEffect)
|
||||
{
|
||||
mParticleNode->removeChild(mParticleEffect);
|
||||
mParticleEffect = NULL;
|
||||
mParticleFader = NULL;
|
||||
}
|
||||
|
||||
if (mCurrentParticleEffect.empty())
|
||||
{
|
||||
if (mParticleNode)
|
||||
|
@ -1439,8 +1447,6 @@ void SkyManager::setWeather(const WeatherResult& weather)
|
|||
mRootNode->removeChild(mParticleNode);
|
||||
mParticleNode = NULL;
|
||||
}
|
||||
mParticleEffect = NULL;
|
||||
mParticleFader = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue