Fix playlist loading errors.
This commit is contained in:
parent
584cade086
commit
4425eabd63
@ -43,7 +43,7 @@ namespace Components
|
||||
Command::Execute("com_maxfps 125");
|
||||
|
||||
// Process command line?
|
||||
//Utils::Hook::Call<void()>(0x60C3D0)();
|
||||
Utils::Hook::Call<void()>(0x60C3D0)();
|
||||
}
|
||||
|
||||
void __declspec(naked) Dedicated::PostInitializationStub()
|
||||
|
@ -82,6 +82,8 @@ namespace Components
|
||||
|
||||
void Party::PlaylistContinue()
|
||||
{
|
||||
Dvar::Var("xblive_privateserver").Set(false);
|
||||
|
||||
// Ensure we can join
|
||||
*Game::g_lobbyCreateInProgress = false;
|
||||
|
||||
@ -118,7 +120,7 @@ namespace Components
|
||||
|
||||
Party::Party()
|
||||
{
|
||||
Dvar::Register<bool>("party_enable", false, Game::dvar_flag::DVAR_FLAG_NONE, "Enable party system");
|
||||
static Game::dvar_t* partyEnable = Dvar::Register<bool>("party_enable", false, Game::dvar_flag::DVAR_FLAG_NONE, "Enable party system").Get<Game::dvar_t*>();
|
||||
Dvar::Register<bool>("xblive_privatematch", true, Game::dvar_flag::DVAR_FLAG_WRITEPROTECTED, "").Get<Game::dvar_t*>();
|
||||
|
||||
// various changes to SV_DirectConnect-y stuff to allow non-party joinees
|
||||
@ -189,6 +191,16 @@ namespace Components
|
||||
// Disable host migration
|
||||
Utils::Hook::Set<BYTE>(0x5B58B2, 0xEB);
|
||||
|
||||
// Patch playlist stuff for non-party behavior
|
||||
Utils::Hook::Set<Game::dvar_t**>(0x4A4093, &partyEnable);
|
||||
Utils::Hook::Set<Game::dvar_t**>(0x4573F1, &partyEnable);
|
||||
Utils::Hook::Set<Game::dvar_t**>(0x5B1A0C, &partyEnable);
|
||||
|
||||
// Invert corresponding jumps
|
||||
Utils::Hook::Xor<BYTE>(0x4A409B, 1);
|
||||
Utils::Hook::Xor<BYTE>(0x4573FA, 1);
|
||||
Utils::Hook::Xor<BYTE>(0x5B1A17, 1);
|
||||
|
||||
// Fix xstartlobby
|
||||
//Utils::Hook::Set<BYTE>(0x5B71CD, 0xEB);
|
||||
|
||||
@ -341,6 +353,8 @@ namespace Components
|
||||
}
|
||||
else
|
||||
{
|
||||
Dvar::Var("xblive_privateserver").Set(true);
|
||||
|
||||
Game::Menus_CloseAll(Game::uiContext);
|
||||
|
||||
char xnaddr[32];
|
||||
|
@ -10,6 +10,16 @@ namespace Components
|
||||
// Check if playlist already loaded
|
||||
if (Utils::Hook::Get<bool>(0x1AD3680)) return;
|
||||
|
||||
// Don't load playlists when dedi and no party
|
||||
if (Dedicated::IsDedicated() && !Dvar::Var("party_enable").Get<bool>())
|
||||
{
|
||||
Utils::Hook::Set<bool>(0x1AD3680, true); // Set received to true
|
||||
Dvar::Var("xblive_privateserver").Set(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Dvar::Var("xblive_privateserver").Set(false);
|
||||
|
||||
std::string playlistFilename = Dvar::Var("playlistFilename").Get<char*>();
|
||||
FileSystem::File playlist(playlistFilename);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user