From 4c3dd1a964eca65f1b68b15abd2877ba64768e4e Mon Sep 17 00:00:00 2001 From: "glassmancody.info" Date: Thu, 4 Nov 2021 08:42:22 -0700 Subject: [PATCH] remove particle node when resetting particle effect --- apps/openmw/mwrender/sky.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index eb7c4a3882..b6b0a3669b 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -535,7 +535,11 @@ namespace MWRender mRootNode->setNodeMask(enabled ? Mask_Sky : 0u); if (!enabled && mParticleNode && mParticleEffect) - mCurrentParticleEffect = {}; + { + mCurrentParticleEffect.clear(); + mParticleNode->removeChild(mParticleEffect); + mParticleEffect = nullptr; + } mEnabled = enabled; }