From a349d386cb65aed89502209fd875a6f1a71944c8 Mon Sep 17 00:00:00 2001 From: quaK <38787176+Joelrau@users.noreply.github.com> Date: Tue, 7 Jun 2022 01:48:15 +0300 Subject: [PATCH] better console quit call --- src/client/component/console.cpp | 4 +--- src/client/game/symbols.hpp | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/component/console.cpp b/src/client/component/console.cpp index 6316f656..d47761b8 100644 --- a/src/client/component/console.cpp +++ b/src/client/component/console.cpp @@ -5,10 +5,8 @@ #include "game/game.hpp" #include -#include #include #include -#include namespace { @@ -115,7 +113,7 @@ namespace console } break; case WM_CLOSE: - game::Cbuf_AddText(0, "quit\n"); + game::Cbuf_AddCall(0, game::Com_Quit_f); DestroyWindow(hwnd); return 0; case WM_CTLCOLOREDIT: diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 2c9701cb..bc30da92 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -11,6 +11,7 @@ namespace game WEAK symbol Com_Quit_f{ 0xBADC90 }; WEAK symbol Cbuf_AddText{ 0xB7C290 }; + WEAK symbol Cbuf_AddCall{ 0xB7C220 }; WEAK symbol Cmd_ExecuteSingleCommand{ 0xB7D040 }; WEAK symbol Cmd_AddCommandInternal{ 0xB7C8F0 };