mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Harden runtime against stutter-inducing log floods and missing display IDs
- Re-gate M2 glow diagnostics behind WOWEE_M2_GLOW_DIAG and DEBUG - Deduplicate missing/failed texture warnings in asset and M2 texture loaders - Deduplicate unhandled opcode warnings by state/opcode key in non-IN_WORLD phases - Throttle malformed spline point-count warnings across world/classic/tbc parsers - Ignore suspiciously huge display IDs from malformed packets with throttled warning - Add nearest-known displayId model fallback cache for missing creature display mappings - Clear display fallback caches on expansion reload and logout
This commit is contained in:
parent
dc91b316ed
commit
fa3060bdf7
8 changed files with 124 additions and 36 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "stb_image.h"
|
||||
|
||||
|
|
@ -145,13 +146,19 @@ BLPImage AssetManager::loadTexture(const std::string& path) {
|
|||
|
||||
std::vector<uint8_t> blpData = readFile(normalizedPath);
|
||||
if (blpData.empty()) {
|
||||
LOG_WARNING("Texture not found: ", normalizedPath);
|
||||
static std::unordered_set<std::string> loggedMissingTextures;
|
||||
if (loggedMissingTextures.insert(normalizedPath).second) {
|
||||
LOG_WARNING("Texture not found: ", normalizedPath);
|
||||
}
|
||||
return BLPImage();
|
||||
}
|
||||
|
||||
BLPImage image = BLPLoader::load(blpData);
|
||||
if (!image.isValid()) {
|
||||
LOG_ERROR("Failed to load texture: ", normalizedPath);
|
||||
static std::unordered_set<std::string> loggedDecodeFails;
|
||||
if (loggedDecodeFails.insert(normalizedPath).second) {
|
||||
LOG_ERROR("Failed to load texture: ", normalizedPath);
|
||||
}
|
||||
return BLPImage();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue