Harden packet framing/logging and checkpoint current workspace state

This commit is contained in:
Kelsi 2026-02-12 02:27:59 -08:00
parent 4b48fcdab2
commit 615efd01b7
9 changed files with 290 additions and 147 deletions

View file

@ -214,6 +214,18 @@ std::vector<uint8_t> AssetManager::readFile(const std::string& path) const {
return data;
}
std::vector<uint8_t> AssetManager::readFileOptional(const std::string& path) const {
if (!initialized) {
return std::vector<uint8_t>();
}
// Avoid MPQManager missing-file warnings for expected probe misses.
if (!fileExists(path)) {
return std::vector<uint8_t>();
}
return readFile(path);
}
void AssetManager::clearCache() {
std::scoped_lock lock(readMutex, cacheMutex);
dbcCache.clear();