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::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_SAYTEAM", "^5Team^7");
|
||||
|
||||
|
@ -76,8 +76,11 @@ namespace party
|
||||
|
||||
perform_game_initialization();
|
||||
|
||||
// exit from virtuallobby
|
||||
utils::hook::invoke<void>(0x13C9C0_b, 1);
|
||||
if (game::VirtualLobby_Loaded())
|
||||
{
|
||||
// exit from virtuallobby
|
||||
utils::hook::invoke<void>(0x13C9C0_b, 1);
|
||||
}
|
||||
|
||||
// CL_ConnectFromParty
|
||||
char session_info[0x100] = {};
|
||||
@ -203,15 +206,11 @@ namespace party
|
||||
game::DVAR_SOURCE_INTERNAL);
|
||||
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([=]()
|
||||
{
|
||||
command::execute("lui_open_popup popup_acceptinginvite", false);
|
||||
// connecting too soon after vid_restart causes a crash ingame (awesome game)
|
||||
scheduler::once([=]()
|
||||
{
|
||||
connect(target);
|
||||
}, scheduler::pipeline::main, 5s);
|
||||
connect(target);
|
||||
}, scheduler::pipeline::main);
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user