Add debug logging for quest marker system troubleshooting

This commit is contained in:
Kelsi 2026-02-09 23:08:30 -08:00
parent cb2678daf4
commit c61a662524

View file

@ -3035,13 +3035,28 @@ void Application::loadQuestMarkerModels() {
}
void Application::updateQuestMarkers() {
if (!gameHandler || !renderer || questExclamationModelId_ == 0) return;
if (!gameHandler || !renderer || questExclamationModelId_ == 0) {
static bool logged = false;
if (!logged) {
LOG_INFO("updateQuestMarkers: skipped - gameHandler=", (gameHandler ? "yes" : "no"),
" renderer=", (renderer ? "yes" : "no"),
" questExclamationModelId=", questExclamationModelId_);
logged = true;
}
return;
}
auto* m2Renderer = renderer->getM2Renderer();
if (!m2Renderer) return;
const auto& questStatuses = gameHandler->getNpcQuestStatuses();
static int logCounter = 0;
if (++logCounter % 300 == 0) { // Log every ~10 seconds at 30fps
LOG_INFO("Quest markers: ", questStatuses.size(), " NPCs with status, ",
questMarkerInstances_.size(), " markers active");
}
// Remove markers for NPCs that no longer have quest status
std::vector<uint64_t> toRemove;
for (const auto& [guid, instanceId] : questMarkerInstances_) {