Check if in game

This commit is contained in:
Federico Cecchetto 2021-02-18 18:10:54 +01:00
parent 1f257b9910
commit db1d9e01f3

View File

@ -221,10 +221,13 @@ namespace party
void send_disconnect() void send_disconnect()
{ {
// CL_ForwardCommandToServer if (game::CL_IsCgameInitialized())
reinterpret_cast<void (*)(int, const char*)>(0x14020B310)(0, "disconnect"); {
// CL_WritePacket // CL_ForwardCommandToServer
reinterpret_cast<void (*)(int)>(0x1402058F0)(0); reinterpret_cast<void (*)(int, const char*)>(0x14020B310)(0, "disconnect");
// CL_WritePacket
reinterpret_cast<void (*)(int)>(0x1402058F0)(0);
}
} }
const auto disconnect_stub = utils::hook::assemble([](utils::hook::assembler& a) const auto disconnect_stub = utils::hook::assemble([](utils::hook::assembler& a)