From f1133cdfa7d8f1673e62cda035b160db64a816cf Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 5 May 2026 23:49:46 -0700 Subject: [PATCH] fix(editor): NPC diagnostics use WARNING level (INFO invisible in Release) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release builds set default log level to WARNING — all the NPC loading diagnostic messages were at LOG_INFO/LOG_DEBUG and completely invisible. This is why the log showed zero NPC messages despite NPCs being placed. All NPC loading messages now use LOG_WARNING: - "NPC rebuild: N creatures to load" — confirms rebuild loop runs - "NPC M2 OK: path (Nv Ni Nb)" — model loaded successfully - "NPC loaded from WOM: path" — WOM format used - "NPC model file not found: path" — file missing - "NPC model invalid: path" — parse failed - "NPC M2 loadModel failed: path" — GPU upload failed - "NPC has empty modelPath: name" — no model selected --- tools/editor/editor_viewport.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/editor/editor_viewport.cpp b/tools/editor/editor_viewport.cpp index 0fa55775..5a5637b4 100644 --- a/tools/editor/editor_viewport.cpp +++ b/tools/editor/editor_viewport.cpp @@ -275,7 +275,7 @@ void EditorViewport::rebuildObjects(const std::vector& objects, // Render NPC creatures as M2 instances if (m2Renderer_ && !npcs.empty()) { - LOG_INFO("Loading ", npcs.size(), " NPC models..."); + LOG_WARNING("NPC rebuild: ", npcs.size(), " creatures to load"); for (const auto& npc : npcs) { if (npc.modelPath.empty()) { LOG_WARNING("NPC has empty modelPath: ", npc.name); continue; } uint32_t modelId; @@ -321,7 +321,7 @@ void EditorViewport::rebuildObjects(const std::vector& objects, pipeline::M2Material mat; mat.flags = 0; mat.blendMode = 0; model.materials.push_back(mat); loaded = true; - LOG_INFO("NPC loaded from WOM: ", prefix, womBase); + LOG_WARNING("NPC loaded from WOM: ", prefix, womBase); break; } } @@ -351,7 +351,7 @@ void EditorViewport::rebuildObjects(const std::vector& objects, " (verts=", model.vertices.size(), " idx=", model.indices.size(), ")"); continue; } - LOG_INFO("NPC M2 loaded: ", npc.modelPath, " (", + LOG_WARNING("NPC M2 OK: ", npc.modelPath, " (", model.vertices.size(), "v ", model.indices.size(), "i ", model.batches.size(), "b)"); if (model.boundRadius < 1.0f) model.boundRadius = 50.0f;