mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: add negative cache for failed spell visual model loads
Spell visual M2 models that fail to load (missing file, empty model, or GPU upload failure) were re-attempted on every subsequent spell cast, causing repeated file I/O during combat. Now caches failed model IDs in spellVisualFailedModels_ so they are skipped on subsequent attempts.
This commit is contained in:
parent
90edb3bc07
commit
bda5bb0a2b
2 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <future>
|
||||
#include <cstddef>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <glm/glm.hpp>
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <vk_mem_alloc.h>
|
||||
|
|
@ -343,6 +344,7 @@ private:
|
|||
std::unordered_map<uint32_t, std::string> spellVisualCastPath_; // visualId → cast M2 path
|
||||
std::unordered_map<uint32_t, std::string> spellVisualImpactPath_; // visualId → impact M2 path
|
||||
std::unordered_map<std::string, uint32_t> spellVisualModelIds_; // M2 path → M2Renderer modelId
|
||||
std::unordered_set<uint32_t> spellVisualFailedModels_; // modelIds that failed to load (negative cache)
|
||||
uint32_t nextSpellVisualModelId_ = 999000; // Reserved range 999000-999799
|
||||
bool spellVisualDbcLoaded_ = false;
|
||||
void loadSpellVisualDbc();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue