mirror of
https://git.minecraftlegacy.com/backups/LCEMP.git
synced 2026-11-25 23:40:17 +00:00
fix: add splitscreen, fix dlcs not loading, major RCE vuln fix on packet net, fix chunk loading on non-server clients, persistent saves
note: I changed how XUID works, player data might be wiped on old saves, save items on a chest or similar before trying to load old saves on new version
This commit is contained in:
1 parent
e077f9250f
commit
d017bfc30a
76 files changed
+14967
-4486
No files matched your search
@@ -433,6 +433,29 @@ bool DirectoryLevelStorage::load(shared_ptr<Player> player)
|
||||
{
|
||||
bool newPlayer = true;
|
||||
CompoundTag *tag = loadPlayerDataTag( player->getXuid() );
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
if (tag == NULL)
|
||||
{
|
||||
const PlayerUID WIN64_XUID_BASE = (PlayerUID)0xe000d45248242f2e;
|
||||
for (int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++)
|
||||
{
|
||||
PlayerUID oldXuid = WIN64_XUID_BASE + i;
|
||||
tag = loadPlayerDataTag(oldXuid);
|
||||
if (tag != NULL)
|
||||
{
|
||||
ConsoleSavePath oldFile = ConsoleSavePath(playerDir.getName() + _toString(oldXuid) + L".dat");
|
||||
if (m_saveFile->doesFileExist(oldFile))
|
||||
{
|
||||
m_saveFile->deleteFile(m_saveFile->createFile(oldFile));
|
||||
}
|
||||
app.DebugPrintf("Migrated player data from old XUID %llu to new XUID %llu\n", oldXuid, player->getXuid());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (tag != NULL)
|
||||
{
|
||||
newPlayer = false;
|
||||
|
||||
Reference in new issue
Block a user