Use StartServer for now

This commit is contained in:
Joelrau 2021-01-18 21:58:46 +02:00
parent 3427387795
commit 0ef00b5a18
2 changed files with 16 additions and 4 deletions

View File

@ -105,7 +105,7 @@ namespace dedicated
game::dvar_t* gscr_set_dynamic_dvar()
{
auto s = game::Scr_GetString(0);
auto dvar = game::Dvar_FindVar(s);
auto* dvar = game::Dvar_FindVar(s);
if (dvar && !strncmp("scr_", dvar->name, 4))
{
return dvar;
@ -132,7 +132,7 @@ namespace dedicated
{
command::execute("exec default_xboxlive.cfg", true);
command::execute("onlinegame 1", true);
command::execute("xblive_privatematch 0", true);
command::execute("xblive_privatematch 1", true);
}
class component final : public component_interface

View File

@ -29,6 +29,8 @@ namespace party
void perform_game_initialization()
{
command::execute("onlinegame 1", true);
command::execute("xblive_privatematch 1", true);
command::execute("startentitlements", true);
}
@ -202,8 +204,18 @@ namespace party
printf("Starting map: %s\n", mapname.data());
game::SV_StartMapForParty(0, mapname.data(), false, false);
return;
auto* gametype = game::Dvar_FindVar("g_gametype");
if (gametype && gametype->current.string)
{
command::execute(utils::string::va("ui_gametype %s", gametype->current.string), true);
}
command::execute(utils::string::va("ui_mapname %s", mapname.data()), true);
// StartServer
reinterpret_cast<void(*)(unsigned int)>(0x140492260)(0);
//game::SV_StartMapForParty(0, mapname.data(), false, false);
//return;
}
}