fix: clear gameObjectDisplayIdWmoCache_ on world transition, add stale-entry guard

gameObjectDisplayIdWmoCache_ was not cleared on world unload/transition,
causing stale WMO model IDs (e.g. 40006, 40003) to be looked up after
the renderer cleared its model list, resulting in "Cannot create instance
of unloaded WMO model" errors on zone re-entry.

Changes:
- Clear gameObjectDisplayIdWmoCache_ alongside other GO caches on world reset
- Add WMORenderer::isModelLoaded() for cache-hit validation
- Inline GO WMO path now verifies cached model is still renderer-resident
  before using it; evicts stale entries and falls back to reload
This commit is contained in:
Kelsi 2026-03-13 03:43:55 -07:00
parent 0487d2eda6
commit 85767187b1
3 changed files with 20 additions and 2 deletions

View file

@ -69,6 +69,12 @@ public:
*/
bool loadModel(const pipeline::WMOModel& model, uint32_t id);
/**
* Check if a WMO model is currently resident in the renderer
* @param id WMO model identifier
*/
bool isModelLoaded(uint32_t id) const;
/**
* Unload WMO model and free GPU resources
* @param id WMO model identifier