Offline LAN crossplay fixes and correct PS3 tutorial pack source

- Handle pre-login permission checks in offline/system-link mode when
  Xbox Live is disabled (grant canPlay/canPlayLocal/friends permissions)
- Log Offline LAN handshake events (PreLogin/Login/GAME_PLAY state)
- Stub: set QNET_STATE_GAME_PLAY on SetGamePlayState and advertise the
  session joinable when hosting
- PS3 postbuild: source the PS3 tutorial pack from the PS3 tree instead
  of the PSVita tree so the big-endian PS3 DLC parser doesn't read a
  little-endian pack as garbage (fixes RPCS3 boot crash in
  DLCManager::processDLCDataFile)
This commit is contained in:
2026-08-07 07:19:34 -07:00
parent 1f5d7817fc
commit 96cf2dfaed
5 changed files with 35 additions and 1 deletions
+15
View File
@@ -159,6 +159,8 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet)
{
if (done) return;
app.DebugPrintf("Offline LAN: received Login\n");
PlayerUID OnlineXuid;
ProfileManager.GetXUID(m_userIndex,&OnlineXuid,true); // online xuid
MOJANG_DATA *pMojangData = NULL;
@@ -1769,6 +1771,7 @@ void ClientConnection::handleEntityActionAtPosition(shared_ptr<EntityActionAtPos
void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
{
app.DebugPrintf("Offline LAN: received PreLogin\n");
// printf("Client: handlePreLogin\n");
#if 1
// 4J - Check that we can play with all the players already in the game who have Friends-Only UGC set
@@ -1791,6 +1794,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
}
#ifdef _XBOX
#if !defined(_DISABLE_XBLIVE)
if(!g_NetworkManager.IsHost() && !app.GetGameHostOption(eGameHostOption_FriendsOfFriends))
{
if(m_userIndex == ProfileManager.GetPrimaryPad() )
@@ -1934,6 +1938,16 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
}
}
}
#else
// Offline/system-link games have no Xbox Live friend list, so grant all
// pre-login permissions (the Xbox Live-only checks above would otherwise
// fail and reject the client's own pre-login before Login is ever sent).
canPlay = TRUE;
canPlayLocal = TRUE;
isAtLeastOneFriend = TRUE;
isFriendsWithHost = TRUE;
cantPlayContentRestricted = FALSE;
#endif // _DISABLE_XBLIVE
#else
// TODO - handle this kind of things for non-360 platforms
canPlay = TRUE;
@@ -2211,6 +2225,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
// All other players we use their offline XUID so that they can play the game offline
ProfileManager.GetXUID(m_userIndex,&offlineXUID,false);
}
app.DebugPrintf("Offline LAN: sending Login\n");
BOOL allAllowed, friendsAllowed;
ProfileManager.AllowedPlayerCreatedContent(m_userIndex,true,&allAllowed,&friendsAllowed);
send( shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE),