mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
fix(rendering): clear M2 texture cache on character switch
M2Renderer::clear() reset descriptor pools but left the texture cache and failed-texture tracking intact. On re-login the stale cache filled the budget, failedTextureRetryAt_ blocked reloads, and the client entered an infinite model-load loop. Match the cleanup already done in shutdown() and CharacterRenderer::clear().
This commit is contained in:
parent
996dc56691
commit
f79110cb14
1 changed files with 14 additions and 0 deletions
|
|
@ -344,6 +344,20 @@ void M2Renderer::clear() {
|
||||||
particleOnlyInstanceIndices_.clear();
|
particleOnlyInstanceIndices_.clear();
|
||||||
particleInstanceIndices_.clear();
|
particleInstanceIndices_.clear();
|
||||||
smokeEmitAccum = 0.0f;
|
smokeEmitAccum = 0.0f;
|
||||||
|
|
||||||
|
// Clear texture cache so stale textures don't block loads for the next
|
||||||
|
// character/map. Without this, the old session's textures fill the cache
|
||||||
|
// budget and failedTextureRetryAt_ blocks legitimate reloads, causing an
|
||||||
|
// infinite model-load loop on character switch.
|
||||||
|
textureCache.clear();
|
||||||
|
texturePropsByPtr_.clear();
|
||||||
|
textureCacheBytes_ = 0;
|
||||||
|
textureCacheCounter_ = 0;
|
||||||
|
failedTextureCache_.clear();
|
||||||
|
failedTextureRetryAt_.clear();
|
||||||
|
loggedTextureLoadFails_.clear();
|
||||||
|
textureLookupSerial_ = 0;
|
||||||
|
textureBudgetRejectWarnings_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void M2Renderer::setCollisionFocus(const glm::vec3& worldPos, float radius) {
|
void M2Renderer::setCollisionFocus(const glm::vec3& worldPos, float radius) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue