mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
Harden packet framing/logging and checkpoint current workspace state
This commit is contained in:
parent
4b48fcdab2
commit
615efd01b7
9 changed files with 290 additions and 147 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue