diff --git a/src/hooks/LevelShutdown.cpp b/src/hooks/LevelShutdown.cpp index 54117a77..871f9f4f 100644 --- a/src/hooks/LevelShutdown.cpp +++ b/src/hooks/LevelShutdown.cpp @@ -16,6 +16,8 @@ DEFINE_HOOKED_METHOD(LevelShutdown, void, void *this_) playerlist::Save(); g_Settings.bInvalid = true; chat_stack::Reset(); + effect_glow::g_EffectGlow.Shutdown(); + effect_chams::g_EffectChams.Shutdown(); EC::run(EC::LevelShutdown); #if ENABLE_IPC if (ipc::peer) diff --git a/src/hooks/Shutdown.cpp b/src/hooks/Shutdown.cpp index d9fbcb13..ca560348 100644 --- a/src/hooks/Shutdown.cpp +++ b/src/hooks/Shutdown.cpp @@ -43,8 +43,6 @@ DEFINE_HOOKED_METHOD(Shutdown, void, INetChannel *this_, const char *reason) if (autoabandon) tfmm::disconnectAndAbandon(); hacks::shared::autojoin::onShutdown(); - effect_glow::g_EffectGlow.Shutdown(); - effect_chams::g_EffectChams.Shutdown(); if (*random_name) { static TextFile file; diff --git a/src/visual/EffectGlow.cpp b/src/visual/EffectGlow.cpp index e09e0221..aaf6aa62 100644 --- a/src/visual/EffectGlow.cpp +++ b/src/visual/EffectGlow.cpp @@ -213,11 +213,6 @@ void EffectGlow::Shutdown() mat_blit.Shutdown(); mat_blur_x.Shutdown(); mat_blur_y.Shutdown(); - SS_NeverSolid.Reset(); - SS_SolidInvisible.Reset(); - SS_Drawing.Reset(); - GetBuffer(1)->Release(); - GetBuffer(2)->Release(); init = false; logging::Info("Shutdown glow"); }