mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Use persistent XUID for all pads in GetXUID
All pads now get unique XUIDs derived from the persistent uid.dat value (base + iPad offset). This gives each split-screen player a globally unique identity that works for both local play and online multiplayer. The host legacy XUID override for save compatibility still happens in Minecraft.cpp after GetXUID is called, so old worlds are unaffected.
This commit is contained in:
parent
1b131ef7c1
commit
21f70fc930
|
|
@ -606,15 +606,11 @@ bool C_4JProfile::QuerySigninStatus(void) { return true; }
|
|||
void C_4JProfile::GetXUID(int iPad, PlayerUID * pXuid, bool bOnlineXuid)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
// Split-screen local players (pad 1-3) need unique XUIDs derived from the
|
||||
// legacy base so the save system and per-player data can tell them apart.
|
||||
// Only pad 0 participates in networking with a "real" identity.
|
||||
if (IQNet::s_isHosting)
|
||||
*pXuid = Win64Xuid::GetLegacyEmbeddedHostXuid() + iPad;
|
||||
else if (iPad == 0)
|
||||
*pXuid = Win64Xuid::ResolvePersistentXuid();
|
||||
else
|
||||
*pXuid = Win64Xuid::GetLegacyEmbeddedBaseXuid() + iPad;
|
||||
// Each pad gets a unique XUID based on the persistent uid.dat value.
|
||||
// Pad 0 uses the base persistent XUID, pads 1-3 offset from it.
|
||||
// Minecraft.cpp overrides pad 0 with legacy XUID when hosting for
|
||||
// save compatibility, but that's handled there, not here.
|
||||
*pXuid = Win64Xuid::ResolvePersistentXuid() + iPad;
|
||||
#else
|
||||
* pXuid = 0xe000d45248242f2e + iPad;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue