feat: show discovered taxi nodes as markers on the world map

Add gold diamond markers for every flight master the player has already
discovered (knownTaxiMask_), read from TaxiNodes.dbc and filtered to the
current continent/map being displayed:
- WorldMapTaxiNode struct carries canonical WoW coords + known flag
- WorldMap::setTaxiNodes() accepts the per-frame list from game_screen
- renderImGuiOverlay() projects each known node to UV, draws a gold
  diamond (AddQuadFilled) with a dark outline, and shows the node name
  as a tooltip on hover
- GameHandler::isKnownTaxiNode(id) checks knownTaxiMask_[] efficiently
- Markers update live — newly discovered nodes appear without reopening
  the map
This commit is contained in:
Kelsi 2026-03-17 19:01:03 -07:00
parent 488ec945b6
commit d60d296b77
4 changed files with 75 additions and 0 deletions

View file

@ -371,6 +371,7 @@ void WorldMap::loadZonesFromDBC() {
}
}
currentMapId_ = mapID;
LOG_INFO("WorldMap: loaded ", zones.size(), " zones for mapID=", mapID,
", continentIdx=", continentIdx);
}
@ -1059,6 +1060,42 @@ void WorldMap::renderImGuiOverlay(const glm::vec3& playerRenderPos, int screenWi
}
}
// Taxi node markers — flight master icons on the map
if (currentIdx >= 0 && viewLevel != ViewLevel::WORLD && !taxiNodes_.empty()) {
ImVec2 mp = ImGui::GetMousePos();
for (const auto& node : taxiNodes_) {
if (!node.known) continue;
if (static_cast<int>(node.mapId) != currentMapId_) continue;
glm::vec3 rPos = core::coords::canonicalToRender(
glm::vec3(node.wowX, node.wowY, node.wowZ));
glm::vec2 uv = renderPosToMapUV(rPos, currentIdx);
if (uv.x < 0.0f || uv.x > 1.0f || uv.y < 0.0f || uv.y > 1.0f) continue;
float px = imgMin.x + uv.x * displayW;
float py = imgMin.y + uv.y * displayH;
// Flight-master icon: yellow diamond with dark border
constexpr float H = 5.0f; // half-size of diamond
ImVec2 top2(px, py - H);
ImVec2 right2(px + H, py );
ImVec2 bot2(px, py + H);
ImVec2 left2(px - H, py );
drawList->AddQuadFilled(top2, right2, bot2, left2,
IM_COL32(255, 215, 0, 230));
drawList->AddQuad(top2, right2, bot2, left2,
IM_COL32(80, 50, 0, 200), 1.2f);
// Tooltip on hover
if (!node.name.empty()) {
float mdx = mp.x - px, mdy = mp.y - py;
if (mdx * mdx + mdy * mdy < 49.0f) {
ImGui::SetTooltip("%s\n(Flight Master)", node.name.c_str());
}
}
}
}
// Hover coordinate display — show WoW coordinates under cursor
if (currentIdx >= 0 && viewLevel != ViewLevel::WORLD) {
auto& io = ImGui::GetIO();