From c8246d42c6f95b0a9dbf70fb55450a08e6f20729 Mon Sep 17 00:00:00 2001 From: Xaver-DaRed Date: Tue, 3 Sep 2024 19:33:10 +0200 Subject: [PATCH] Implement common cap for Quickening and Mazurka Co-authored-by: cocosolos --- src/map/entities/battleentity.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/map/entities/battleentity.cpp b/src/map/entities/battleentity.cpp index f98e6f5e8a2..53e4e91df7b 100644 --- a/src/map/entities/battleentity.cpp +++ b/src/map/entities/battleentity.cpp @@ -258,10 +258,8 @@ uint8 CBattleEntity::GetSpeed() // KIs, Gear penalties, Bolters Roll. float additiveMods = static_cast(getMod(Mod::MOVE_SPEED_STACKABLE)); - // Quickening and Mazurka. Only highest applies. Additive. - Mod modToUse = getMod(Mod::MOVE_SPEED_QUICKENING) > getMod(Mod::MOVE_SPEED_MAZURKA) ? Mod::MOVE_SPEED_QUICKENING : Mod::MOVE_SPEED_MAZURKA; - - float effectAdditiveBonus = static_cast(getMod(modToUse)); + // Quickening and Mazurka. They share a cap. Additive. + float effectAdditiveBonus = std::clamp(static_cast(getMod(Mod::MOVE_SPEED_QUICKENING)) + static_cast(getMod(Mod::MOVE_SPEED_MAZURKA)), 0.0f, 10.0f); // Flee. float fleeFactor = std::clamp(1.0f + static_cast(getMod(Mod::MOVE_SPEED_FLEE)) / 100.0f, 1.0f, 2.0f);