mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Consider units on wall hexes as 'inside' town for tower target selection
This commit is contained in:
@@ -267,6 +267,12 @@ public:
|
||||
return hex < other.hex;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool operator <=(const BattleHex & other) const noexcept
|
||||
{
|
||||
return hex <= other.hex;
|
||||
}
|
||||
|
||||
|
||||
template <typename Handler>
|
||||
void serialize(Handler & h)
|
||||
{
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user