diff --git a/source/code/RenderWare.cpp b/source/code/RenderWare.cpp index e84ee64..839932f 100644 --- a/source/code/RenderWare.cpp +++ b/source/code/RenderWare.cpp @@ -168,4 +168,9 @@ RwVideoMode *RwEngineGetVideoModeInfo(RwVideoMode *modeinfo, RwInt32 modeIndex) RwBool RpClumpDestroy(RpClump * clump) { return CallAndReturn(clump); -} \ No newline at end of file +} + +RwBool RpLightDestroy(RpLight *light) +{ + return CallAndReturn(light); +} diff --git a/source/code/plugin/eCommonHooks.cpp b/source/code/plugin/eCommonHooks.cpp index c4bb2ec..f9be3bc 100644 --- a/source/code/plugin/eCommonHooks.cpp +++ b/source/code/plugin/eCommonHooks.cpp @@ -14,11 +14,13 @@ #include "..\manhunt\Scene.h" #include "..\manhunt\Player.h" #include "..\plugin\eSkinLoader.h" +#include "eNewFrontend.h" void HookCommonShutdown() { eStatsManager::SaveToFile(); eSkinLoader::Shutdown(); + eNewFrontend::DestroyMenuLightWorld(); Call<0x489D50>(); } diff --git a/source/code/plugin/eNewFrontend.cpp b/source/code/plugin/eNewFrontend.cpp index c8f8903..126adb0 100644 --- a/source/code/plugin/eNewFrontend.cpp +++ b/source/code/plugin/eNewFrontend.cpp @@ -875,3 +875,10 @@ void eNewFrontend::HookCreateMenuLight() //RwCameraSetViewWindow(CFrontend::GetFrontendCamera(), &aspectRatio); } + +void eNewFrontend::DestroyMenuLightWorld() +{ + RpWorldRemoveLight(ms_pMenuWorld, ms_pMenuLight); + RpLightDestroy(ms_pMenuLight); + RpWorldDestroy(ms_pMenuWorld); +} diff --git a/source/code/plugin/eNewFrontend.h b/source/code/plugin/eNewFrontend.h index 1987aee..1b190a8 100644 --- a/source/code/plugin/eNewFrontend.h +++ b/source/code/plugin/eNewFrontend.h @@ -76,4 +76,6 @@ class eNewFrontend { static void HookDrawRasterLineFX(int a1, int a2, int a3, int a4); static void HookCreateMenuLight(); + + static void DestroyMenuLightWorld(); }; \ No newline at end of file