diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 24c91c48..16580640 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -3789,6 +3789,9 @@ void GameHandler::handleAuraUpdate(network::Packet& packet, bool isAll) { } if (auraList) { + if (isAll) { + auraList->clear(); + } for (const auto& [slot, aura] : data.updates) { // Ensure vector is large enough while (auraList->size() <= slot) { diff --git a/src/rendering/wmo_renderer.cpp b/src/rendering/wmo_renderer.cpp index 20c90500..6cac3948 100644 --- a/src/rendering/wmo_renderer.cpp +++ b/src/rendering/wmo_renderer.cpp @@ -1767,7 +1767,7 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to, // Player collision parameters const float PLAYER_RADIUS = 0.70f; // Wider radius for better wall collision const float PLAYER_HEIGHT = 2.0f; // Player height for wall checks - const float MAX_STEP_HEIGHT = 0.6f; // Allow stepping up stairs (lowered to catch curbs) + const float MAX_STEP_HEIGHT = 1.0f; // Allow stepping up stairs/ramps glm::vec3 queryMin = glm::min(from, to) - glm::vec3(8.0f, 8.0f, 5.0f); glm::vec3 queryMax = glm::max(from, to) + glm::vec3(8.0f, 8.0f, 5.0f); @@ -1873,7 +1873,7 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to, if (triMaxZ <= localFeetZ + MAX_STEP_HEIGHT) continue; // Skip very short vertical surfaces (stair risers) - if (triHeight < 0.6f && triMaxZ <= localFeetZ + 0.8f) continue; + if (triHeight < 1.0f && triMaxZ <= localFeetZ + 1.2f) continue; // Recompute distances with current (possibly pushed) localTo float fromDist = glm::dot(localFrom - v0, normal); diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 66448dec..9c099791 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -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++; }