mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
fixed DLC files not saving correctly
This commit is contained in:
parent
8f77ffa40d
commit
dd73385506
|
|
@ -11,12 +11,8 @@ bool RegionFileCache::useSplitSaves(ESavePlatform platform)
|
|||
{
|
||||
case SAVE_FILE_PLATFORM_XBONE:
|
||||
case SAVE_FILE_PLATFORM_PS4:
|
||||
return true;
|
||||
case SAVE_FILE_PLATFORM_WIN64:
|
||||
{
|
||||
LevelGenerationOptions* lgo = app.getLevelGenerationOptions();
|
||||
return (lgo != nullptr && lgo->isFromDLC());
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
};
|
||||
|
|
@ -35,7 +31,11 @@ RegionFile *RegionFileCache::_getRegionFile(ConsoleSaveFile *saveFile, const wst
|
|||
File file;
|
||||
if(useSplitSaves(saveFile->getSavePlatform()))
|
||||
{
|
||||
file = File( prefix + wstring(L"r.") + std::to_wstring(chunkX>>4) + L"." + std::to_wstring(chunkZ>>4) + L".mcr" );
|
||||
File oldFile(prefix + wstring(L"r.") + std::to_wstring(chunkX >> 5) + L"." + std::to_wstring(chunkZ >> 5) + L".mcr");
|
||||
if (oldFile.exists())
|
||||
file = oldFile;
|
||||
else
|
||||
file = File(prefix + wstring(L"r.") + std::to_wstring(chunkX >> 4) + L"." + std::to_wstring(chunkZ >> 4) + L".mcr");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue