Fix crash on map rotation
This commit is contained in:
parent
23f48b1ce0
commit
d80d9f8004
@ -316,9 +316,6 @@ namespace dedicated
|
|||||||
// Workaround for server spamming 'exec default_xboxlive.cfg' when not running
|
// Workaround for server spamming 'exec default_xboxlive.cfg' when not running
|
||||||
ui_set_active_menu_hook.create(0x1E4D80_b, ui_set_active_menu_stub);
|
ui_set_active_menu_hook.create(0x1E4D80_b, ui_set_active_menu_stub);
|
||||||
|
|
||||||
// Dont free server client memory on asset loading
|
|
||||||
utils::hook::nop(0x132474_b, 5);
|
|
||||||
|
|
||||||
// initialize the game after onlinedataflags is 32 (workaround)
|
// initialize the game after onlinedataflags is 32 (workaround)
|
||||||
scheduler::schedule([=]()
|
scheduler::schedule([=]()
|
||||||
{
|
{
|
||||||
|
@ -124,10 +124,10 @@ namespace patches
|
|||||||
|
|
||||||
command::params_sv params{};
|
command::params_sv params{};
|
||||||
const auto menu_id = atoi(params.get(1));
|
const auto menu_id = atoi(params.get(1));
|
||||||
const auto client = svs_clients[ent->s.entityNum];
|
const auto client = &svs_clients[ent->s.entityNum];
|
||||||
|
|
||||||
// 22 => "end_game"
|
// 22 => "end_game"
|
||||||
if (menu_id == 22 && client.header.remoteAddress.type != game::NA_LOOPBACK)
|
if (menu_id == 22 && client->header.remoteAddress.type != game::NA_LOOPBACK)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -308,6 +308,9 @@ namespace patches
|
|||||||
|
|
||||||
// Change default hostname and make it replicated
|
// Change default hostname and make it replicated
|
||||||
dvars::override::register_string("sv_hostname", "^2H1-Mod^7 Default Server", game::DVAR_FLAG_REPLICATED);
|
dvars::override::register_string("sv_hostname", "^2H1-Mod^7 Default Server", game::DVAR_FLAG_REPLICATED);
|
||||||
|
|
||||||
|
// Dont free server/client memory on asset loading (fixes crashing on map rotation)
|
||||||
|
utils::hook::nop(0x132474_b, 5);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user