feat: show taxi flight destination indicator below minimap

Stores the destination node name when activateTaxi() is called and
displays a "✈ → <Destination>" indicator in the minimap indicator
stack while isOnTaxiFlight() is true. Falls back to "✈ In Flight"
when the destination name is unavailable.
This commit is contained in:
Kelsi 2026-03-13 09:44:27 -07:00
parent f5a834b543
commit d58c2f4269
3 changed files with 26 additions and 2 deletions

View file

@ -1873,6 +1873,7 @@ public:
bool isTaxiMountActive() const { return taxiMountActive_; }
bool isTaxiActivationPending() const { return taxiActivatePending_; }
void forceClearTaxiAndMovementState();
const std::string& getTaxiDestName() const { return taxiDestName_; }
const ShowTaxiNodesData& getTaxiData() const { return currentTaxiData_; }
uint32_t getTaxiCurrentNode() const { return currentTaxiData_.nearestNode; }
@ -2900,6 +2901,7 @@ private:
ShowTaxiNodesData currentTaxiData_;
uint64_t taxiNpcGuid_ = 0;
bool onTaxiFlight_ = false;
std::string taxiDestName_;
bool taxiMountActive_ = false;
uint32_t taxiMountDisplayId_ = 0;
bool taxiActivatePending_ = false;

View file

@ -20759,10 +20759,13 @@ void GameHandler::activateTaxi(uint32_t destNodeId) {
{
auto destIt = taxiNodes_.find(destNodeId);
if (destIt != taxiNodes_.end() && !destIt->second.name.empty())
if (destIt != taxiNodes_.end() && !destIt->second.name.empty()) {
taxiDestName_ = destIt->second.name;
addSystemChatMessage("Requesting flight to " + destIt->second.name + "...");
else
} else {
taxiDestName_.clear();
addSystemChatMessage("Taxi: requesting flight...");
}
}
// BFS to find path from startNode to destNodeId

View file

@ -16681,6 +16681,25 @@ void GameScreen::renderMinimapMarkers(game::GameHandler& gameHandler) {
}
}
// Taxi flight indicator — shown while on a flight path
if (gameHandler.isOnTaxiFlight()) {
ImGui::SetNextWindowPos(ImVec2(indicatorX, nextIndicatorY), ImGuiCond_Always);
ImGui::SetNextWindowSize(ImVec2(indicatorW, kIndicatorH), ImGuiCond_Always);
if (ImGui::Begin("##TaxiIndicator", nullptr, indicatorFlags)) {
const std::string& dest = gameHandler.getTaxiDestName();
float pulse = 0.7f + 0.3f * std::sin(static_cast<float>(ImGui::GetTime()) * 1.0f);
if (dest.empty()) {
ImGui::TextColored(ImVec4(0.6f, 0.85f, 1.0f, pulse), "\xe2\x9c\x88 In Flight");
} else {
char buf[64];
snprintf(buf, sizeof(buf), "\xe2\x9c\x88 \xe2\x86\x92 %s", dest.c_str());
ImGui::TextColored(ImVec4(0.6f, 0.85f, 1.0f, pulse), "%s", buf);
}
}
ImGui::End();
nextIndicatorY += kIndicatorH;
}
// Latency indicator — centered at top of screen
uint32_t latMs = gameHandler.getLatencyMs();
if (showLatencyMeter_ && latMs > 0 && gameHandler.getState() == game::WorldState::IN_WORLD) {