Close battle net popup if open

This commit is contained in:
Federico Cecchetto 2021-08-29 19:11:58 +02:00
parent 24fbf67d1f
commit c114cfc81e
2 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,8 @@
#include <stdinc.hpp>
#include "loader/component_loader.hpp"
#include "scheduler.hpp"
#include "game/game.hpp"
#include "game/dvars.hpp"
@ -32,6 +34,14 @@ namespace patches
// Disable battle net popup
utils::hook::set(game::base_address + 0xBE7F83C, true);
scheduler::once([]()
{
if (game::Menu_IsMenuOpenAndVisible(0, "bnet_error_popup"))
{
game::LUI_OpenMenu(0, "", 1, 0, 0);
}
}, scheduler::pipeline::main);
pm_crashland_hook.create(game::base_address + 0x688A20, pm_crashland_stub);
dvars::jump_enableFallDamage = dvars::register_bool("jump_enableFallDamage", 1, game::DVAR_FLAG_REPLICATED);

View File

@ -59,6 +59,7 @@ namespace game
uint32_t imageFlags, DXGI_FORMAT imageFormat, int a8, const char* name, const void* initData)> Image_Setup{0x74B2A0};
WEAK symbol<void(int clientNum, const char* menu, int a3, int a4, unsigned int a5)> LUI_OpenMenu{0x5F0EE0};
WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{0x5EE1A0};
WEAK symbol<Material*(const char* material)> Material_RegisterHandle{0x759BA0};