diff --git a/lib/battle/BattleHex.h b/lib/battle/BattleHex.h index ed7399d36..34657bbab 100644 --- a/lib/battle/BattleHex.h +++ b/lib/battle/BattleHex.h @@ -267,6 +267,12 @@ public: return hex < other.hex; } + [[nodiscard]] bool operator <=(const BattleHex & other) const noexcept + { + return hex <= other.hex; + } + + template void serialize(Handler & h) { diff --git a/lib/battle/CBattleInfoCallback.cpp b/lib/battle/CBattleInfoCallback.cpp index ca88f911a..0932152d6 100644 --- a/lib/battle/CBattleInfoCallback.cpp +++ b/lib/battle/CBattleInfoCallback.cpp @@ -51,7 +51,7 @@ static bool sameSideOfWall(const BattleHex & pos1, const BattleHex & pos2) static bool isInsideWalls(const BattleHex & pos) { - return lineToWallHex(pos.getY()) < pos; + return lineToWallHex(pos.getY()) <= pos; } // parts of wall