Do not refresh arena if g_quitRequested

This commit is contained in:
Louvenarde 2024-06-16 10:07:20 +02:00
parent 5ac6b8cd19
commit 7d974ecd82
3 changed files with 8 additions and 0 deletions

View File

@ -322,6 +322,12 @@ namespace Components
{
if (Game::Sys_IsMainThread())
{
if (*Game::g_quitRequested)
{
// No need to refresh if we're exiting the game
return;
}
Game::sharedUiInfo_t* uiInfo = reinterpret_cast<Game::sharedUiInfo_t*>(0x62E4B78);
uiInfo->updateArenas = 1;
Game::UI_UpdateArenas();

View File

@ -17,6 +17,7 @@ namespace Game
G_DebugLineWithDuration_t G_DebugLineWithDuration = G_DebugLineWithDuration_t(0x4C3280);
gentity_s* g_entities = reinterpret_cast<gentity_s*>(0x18835D8);
bool* g_quitRequested = reinterpret_cast<bool*>(0x649FB61);
NetField* clientStateFields = reinterpret_cast<Game::NetField*>(0x741E40);
size_t clientStateFieldsCount = Utils::Hook::Get<size_t>(0x7433C8);

View File

@ -52,6 +52,7 @@ namespace Game
constexpr std::size_t MAX_GENTITIES = 2048;
constexpr std::size_t ENTITYNUM_NONE = MAX_GENTITIES - 1;
extern gentity_s* g_entities;
extern bool* g_quitRequested;
// This does not belong anywhere else
extern NetField* clientStateFields;