diff --git a/src/Components/Modules/Console.cpp b/src/Components/Modules/Console.cpp index 7b249bd7..61d365c9 100644 --- a/src/Components/Modules/Console.cpp +++ b/src/Components/Modules/Console.cpp @@ -495,6 +495,11 @@ namespace Components return *reinterpret_cast(0x64A3288); } + void Console::ShowAsyncConsole() + { + Console::ConsoleThread = std::thread(Console::ConsoleRunner); + } + Game::dvar_t* Console::RegisterConColor(const char* name, float r, float g, float b, float a, float min, float max, int flags, const char* description) { static struct @@ -593,7 +598,7 @@ namespace Components Utils::Hook(0x60BB68, [] () { - Console::ConsoleThread = std::thread(Console::ConsoleRunner); + Console::ShowAsyncConsole(); }, HOOK_CALL).install()->quick(); Utils::Hook(0x4D69A2, []() diff --git a/src/Components/Modules/Console.hpp b/src/Components/Modules/Console.hpp index 97a3ed6b..1b06c22a 100644 --- a/src/Components/Modules/Console.hpp +++ b/src/Components/Modules/Console.hpp @@ -21,6 +21,8 @@ namespace Components static HWND GetWindow(); + static void ShowAsyncConsole(); + private: // Text-based console stuff static WINDOW* OutputWindow; diff --git a/src/Components/Modules/ZoneBuilder.cpp b/src/Components/Modules/ZoneBuilder.cpp index b4ccfffd..4ca9665f 100644 --- a/src/Components/Modules/ZoneBuilder.cpp +++ b/src/Components/Modules/ZoneBuilder.cpp @@ -811,7 +811,7 @@ namespace Components Utils::Hook::Call(0x64A020)(); // PMem_Init if (!Flags::HasFlag("stdout")) { - Game::Sys_ShowConsole(); + Console::ShowAsyncConsole(); Utils::Hook::Call(0x43D140)(); // Com_EventLoop } Utils::Hook::Call(0x502580)(static_cast(__rdtsc())); // Netchan_Init @@ -1088,7 +1088,6 @@ namespace Components return result; }); -#ifdef ENABLE_EXPERIMENTAL_ENTRYPOINT // set new entry point Utils::Hook(0x4513DA, ZoneBuilder::EntryPoint, HOOK_JUMP).install()->quick(); @@ -1100,7 +1099,9 @@ namespace Components // thread fuckery hooks Utils::Hook(0x4C37D0, ZoneBuilder::IsThreadMainThreadHook, HOOK_JUMP).install()->quick(); -#endif + + // Don't exec startup config in fs_restart + Utils::Hook::Set(0x461B48, 0xEB); // remove overriding asset messages Utils::Hook::Nop(0x5BC74E, 5);