Fix reconnect crashing
This commit is contained in:
parent
36739acae4
commit
e2e1c908d4
@ -34,11 +34,6 @@ namespace chat
|
|||||||
utils::hook::inject(0x18A980_b, reinterpret_cast<void*>(0x2E6F588_b));
|
utils::hook::inject(0x18A980_b, reinterpret_cast<void*>(0x2E6F588_b));
|
||||||
utils::hook::call(0x33EDEC_b, ui_get_font_handle_stub);
|
utils::hook::call(0x33EDEC_b, ui_get_font_handle_stub);
|
||||||
|
|
||||||
// set text style to 0 (non-blurry)
|
|
||||||
utils::hook::set<uint8_t>(0x18A9F2_b, 0);
|
|
||||||
utils::hook::set<uint8_t>(0x0F7151_b, 0);
|
|
||||||
utils::hook::set<uint8_t>(0x33EE0E_b, 0);
|
|
||||||
|
|
||||||
localized_strings::override("EXE_SAY", "^3Match^7");
|
localized_strings::override("EXE_SAY", "^3Match^7");
|
||||||
localized_strings::override("EXE_SAYTEAM", "^5Team^7");
|
localized_strings::override("EXE_SAYTEAM", "^5Team^7");
|
||||||
|
|
||||||
|
@ -76,8 +76,11 @@ namespace party
|
|||||||
|
|
||||||
perform_game_initialization();
|
perform_game_initialization();
|
||||||
|
|
||||||
|
if (game::VirtualLobby_Loaded())
|
||||||
|
{
|
||||||
// exit from virtuallobby
|
// exit from virtuallobby
|
||||||
utils::hook::invoke<void>(0x13C9C0_b, 1);
|
utils::hook::invoke<void>(0x13C9C0_b, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// CL_ConnectFromParty
|
// CL_ConnectFromParty
|
||||||
char session_info[0x100] = {};
|
char session_info[0x100] = {};
|
||||||
@ -203,15 +206,11 @@ namespace party
|
|||||||
game::DVAR_SOURCE_INTERNAL);
|
game::DVAR_SOURCE_INTERNAL);
|
||||||
command::execute("vid_restart");
|
command::execute("vid_restart");
|
||||||
|
|
||||||
// set fs_game to the mod the server is on, "restart" game, and then (hopefully) reconnect
|
// set fs_game to the mod the server is on, "restart" game, and then reconnect
|
||||||
scheduler::once([=]()
|
scheduler::once([=]()
|
||||||
{
|
{
|
||||||
command::execute("lui_open_popup popup_acceptinginvite", false);
|
command::execute("lui_open_popup popup_acceptinginvite", false);
|
||||||
// connecting too soon after vid_restart causes a crash ingame (awesome game)
|
|
||||||
scheduler::once([=]()
|
|
||||||
{
|
|
||||||
connect(target);
|
connect(target);
|
||||||
}, scheduler::pipeline::main, 5s);
|
|
||||||
}, scheduler::pipeline::main);
|
}, scheduler::pipeline::main);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user