Fix crash related to glow and chams

Needs more testing
This commit is contained in:
TotallyNotElite 2019-04-18 21:43:02 +02:00
parent 674e77e78f
commit a27734eb88
3 changed files with 2 additions and 7 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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");
}