diff --git a/src/Components/Modules/Scheduler.cpp b/src/Components/Modules/Scheduler.cpp index 858970a4..94a778f4 100644 --- a/src/Components/Modules/Scheduler.cpp +++ b/src/Components/Modules/Scheduler.cpp @@ -67,9 +67,9 @@ namespace Components Pipelines[type].execute(); } - void Scheduler::REndFrame_Hk() + void Scheduler::CL_DrawScreen_Hk() { - Utils::Hook::Call(0x50AB20)(); + Utils::Hook::Call(0x5AC950)(); Execute(Pipeline::RENDERER); } @@ -165,9 +165,7 @@ namespace Components } }); - Utils::Hook(0x4DBE9A, REndFrame_Hk, HOOK_CALL).install()->quick(); - Utils::Hook(0x518D5C, REndFrame_Hk, HOOK_CALL).install()->quick(); - Utils::Hook(0x5ACBA3, REndFrame_Hk, HOOK_CALL).install()->quick(); + Utils::Hook(0x5ACB99, CL_DrawScreen_Hk, HOOK_CALL).install()->quick(); // Hook G_Glass_Update so we may fix TLS issues Utils::Hook(0x416049, ServerFrame_Hk, HOOK_CALL).install()->quick(); diff --git a/src/Components/Modules/Scheduler.hpp b/src/Components/Modules/Scheduler.hpp index 5d430a9b..c445e4ad 100644 --- a/src/Components/Modules/Scheduler.hpp +++ b/src/Components/Modules/Scheduler.hpp @@ -59,7 +59,7 @@ namespace Components static void Execute(Pipeline type); - static void REndFrame_Hk(); + static void CL_DrawScreen_Hk(); static void ServerFrame_Hk(); static void ClientFrame_Hk(int localClientNum); static void MainFrame_Hk(); diff --git a/src/Components/Modules/Toast.cpp b/src/Components/Modules/Toast.cpp index 58f07398..4014f043 100644 --- a/src/Components/Modules/Toast.cpp +++ b/src/Components/Modules/Toast.cpp @@ -142,14 +142,6 @@ namespace Components } } - - void Toast::CL_DrawScreen_Stub(int localClientNum) - { - Utils::Hook::Call(0x5AC950)(localClientNum); - - Handler(); - } - Toast::Toast() { if (Dedicated::IsEnabled() || Monitor::IsEnabled() || ZoneBuilder::IsEnabled()) @@ -157,7 +149,7 @@ namespace Components return; } - Utils::Hook(0x5ACB99, CL_DrawScreen_Stub, HOOK_CALL).install()->quick(); + Scheduler::Loop(Handler, Scheduler::Pipeline::RENDERER); #ifdef TEST_TOAST Command::Add("testtoast", []([[maybe_unused]] Command::Params* params) diff --git a/src/Components/Modules/Toast.hpp b/src/Components/Modules/Toast.hpp index f0d805e8..6045d442 100644 --- a/src/Components/Modules/Toast.hpp +++ b/src/Components/Modules/Toast.hpp @@ -23,7 +23,6 @@ namespace Components static void Handler(); static void Draw(UIToast* toast); - static void CL_DrawScreen_Stub(int localClientNum); static std::queue Queue; static std::mutex Mutex;