mirror of
https://github.com/LCEMP/LCEMP.git
synced 2026-06-18 15:02:53 +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:
@@ -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