* Fix the same errors as in the decomp repo.

This commit is contained in:
iProgramInCpp
2023-08-03 22:04:48 +03:00
parent dca2f0b480
commit cd36908905
3 changed files with 12 additions and 0 deletions

View File

@@ -179,6 +179,8 @@ void ChunkCache::saveAll()
m_pChunkStorage->saveAll(m_pLevel, chunksToSave);
}
#ifdef ENH_IMPROVED_SAVING
void ChunkCache::saveUnsaved()
{
if (!m_pChunkStorage) return;
@@ -200,6 +202,8 @@ void ChunkCache::saveUnsaved()
m_pChunkStorage->saveAll(m_pLevel, chunksToSave);
}
#endif
bool ChunkCache::shouldSave()
{
return true;

View File

@@ -10,6 +10,8 @@
#include "Level.hpp"
#include "GetTime.h"
#ifdef DEMO
#define C_CHUNKS_TO_SAVE_PER_TICK (2)
ExternalFileLevelStorage::ExternalFileLevelStorage(const std::string& a, const std::string& path) :
@@ -312,3 +314,5 @@ bool ExternalFileLevelStorage::writeLevelData(const std::string& path, LevelData
return true;
}
#endif

View File

@@ -10,6 +10,8 @@
#include "ExternalFileLevelStorage.hpp"
#include "Util.hpp"
#ifdef DEMO
ExternalFileLevelStorageSource::ExternalFileLevelStorageSource(const std::string& path)
{
m_worldsPath = path;
@@ -162,3 +164,5 @@ void ExternalFileLevelStorageSource::addLevelSummaryIfExists(std::vector<LevelSu
ls.field_34 = ld.field_18;
vls.push_back(ls);
}
#endif