From 0487d2eda6790bf6a62aafa68669842003bea70f Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 13 Mar 2026 03:41:42 -0700 Subject: [PATCH] fix: check loadModel return before createInstance for WMO doodads When the M2 model cache is full (>6000 entries), loadModel() returns false and the model is never added to the GPU cache. The WMO instance doodad path was calling createInstanceWithMatrix() unconditionally, generating hundreds of "Cannot create instance: model X not loaded" warnings on zone entry. Add the same guard already present in the terrain doodad path. --- src/core/application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/application.cpp b/src/core/application.cpp index 79bc6c7f..6c74e854 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -4464,7 +4464,7 @@ void Application::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float glm::vec3 worldPos = glm::vec3(worldMatrix[3]); uint32_t doodadModelId = static_cast(std::hash{}(m2Path)); - m2Renderer->loadModel(m2Model, doodadModelId); + if (!m2Renderer->loadModel(m2Model, doodadModelId)) continue; uint32_t doodadInstId = m2Renderer->createInstanceWithMatrix(doodadModelId, worldMatrix, worldPos); if (doodadInstId) m2Renderer->setSkipCollision(doodadInstId, true); loadedDoodads++;