Fix buff bar updates, stair collision, and right-click aura cancel

Clear aura list on AURA_UPDATE_ALL so dismount/WMO transitions refresh
properly. Increase WMO step height thresholds to reduce stair blocking.
Change buff cancel to right-click and support dismount via buff bar.
This commit is contained in:
Kelsi 2026-02-08 00:00:12 -08:00
parent b3b1cc80c6
commit aa462fdb1f
3 changed files with 16 additions and 10 deletions

View file

@ -2882,11 +2882,10 @@ void GameScreen::renderBuffBar(game::GameHandler& gameHandler) {
iconTex = getSpellIcon(aura.spellId, assetMgr);
}
bool clicked = false;
if (iconTex) {
ImGui::PushStyleColor(ImGuiCol_Button, borderColor);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 2));
clicked = ImGui::ImageButton("##aura",
ImGui::ImageButton("##aura",
(ImTextureID)(uintptr_t)iconTex,
ImVec2(ICON_SIZE - 4, ICON_SIZE - 4));
ImGui::PopStyleVar();
@ -2895,10 +2894,19 @@ void GameScreen::renderBuffBar(game::GameHandler& gameHandler) {
ImGui::PushStyleColor(ImGuiCol_Button, borderColor);
char label[8];
snprintf(label, sizeof(label), "%u", aura.spellId);
clicked = ImGui::Button(label, ImVec2(ICON_SIZE, ICON_SIZE));
ImGui::Button(label, ImVec2(ICON_SIZE, ICON_SIZE));
ImGui::PopStyleColor();
}
// Right-click to cancel buffs / dismount
if (ImGui::IsItemClicked(ImGuiMouseButton_Right) && isBuff) {
if (gameHandler.isMounted()) {
gameHandler.dismount();
} else {
gameHandler.cancelAura(aura.spellId);
}
}
// Tooltip with spell name and duration
if (ImGui::IsItemHovered()) {
std::string name;
@ -2920,11 +2928,6 @@ void GameScreen::renderBuffBar(game::GameHandler& gameHandler) {
}
}
// Click to cancel own buffs
if (clicked && isBuff) {
gameHandler.cancelAura(aura.spellId);
}
ImGui::PopID();
shown++;
}