[QuickPatch] Fix crash caused by drawing mini console when no graphics initialized.
This commit is contained in:
parent
c639f232f9
commit
38e4f75411
@ -655,6 +655,8 @@ namespace Components
|
|||||||
|
|
||||||
// Constantly draw the mini console
|
// Constantly draw the mini console
|
||||||
Utils::Hook::Set<BYTE>(0x412A45, 0xEB);
|
Utils::Hook::Set<BYTE>(0x412A45, 0xEB);
|
||||||
|
|
||||||
|
if (!Dedicated::IsEnabled() && !ZoneBuilder::IsEnabled()) {
|
||||||
Scheduler::OnFrame([]()
|
Scheduler::OnFrame([]()
|
||||||
{
|
{
|
||||||
if (*reinterpret_cast<Game::Font**>(0x62E4BAC))
|
if (*reinterpret_cast<Game::Font**>(0x62E4BAC))
|
||||||
@ -662,6 +664,7 @@ namespace Components
|
|||||||
Game::Con_DrawMiniConsole(0, 2, 4, (Game::CL_IsCgameInitialized() ? 1.0f : 0.4f));
|
Game::Con_DrawMiniConsole(0, 2, 4, (Game::CL_IsCgameInitialized() ? 1.0f : 0.4f));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
// Remove missing tag message
|
// Remove missing tag message
|
||||||
Utils::Hook::Nop(0x4EBF1A, 5);
|
Utils::Hook::Nop(0x4EBF1A, 5);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user