fix quit possibly

This commit is contained in:
quaK 2024-02-01 00:54:22 +02:00
parent bc1f7b9ea9
commit ee0eeb4bb7
3 changed files with 8 additions and 5 deletions

View File

@ -10,10 +10,6 @@
#include "utils/hook.hpp"
#include <utils/string.hpp>
// Fonts used in game:
// fonts/blender_pro_bold.ttf, fonts/blender_pro_book.ttf, fonts/blender_pro_heavy.ttf, fonts/blender_pro_medium.ttf
// fonts/changelingneo-regular.ttf, fonts/dev.ttf, fonts/fira_mono_bold.ttf, fonts/fira_mono_regular.ttf, fonts/iw6_digital.ttf
namespace branding
{
namespace

View File

@ -446,7 +446,11 @@ namespace command
private:
static void add_commands()
{
add("quit", game::Com_Quit_f);
add("quit", []()
{
*game::g_quitRequested = true;
});
add("crash", []()
{
*reinterpret_cast<int*>(1) = 0;

View File

@ -23,6 +23,7 @@ namespace game
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{ 0xB8D830 };
WEAK symbol<void()> Com_Quit_f{ 0xBADC90 };
WEAK symbol<void()> j_Com_Quit_f{ 0xD33D10 };
WEAK symbol<bool()> Com_FrontEnd_IsInFrontEnd{ 0x5AE6C0 };
WEAK symbol<void()> Com_FrontEnd_ExitFrontEnd{ 0x5AE4F0 };
@ -315,4 +316,6 @@ namespace game
WEAK symbol<char*> db_zip_memory{ 0x525B500 };
WEAK symbol<unsigned __int64> g_streamPos{ 0x5687E30 };
WEAK symbol<bool> g_quitRequested{ 0x779CD44 };
}