diff --git a/src/BuildingPlacer.cpp b/src/BuildingPlacer.cpp index e5d85337febcd96c50db63a732c94740aef48c78..9638349f5ee62fe63449ac8bf44e4af5c644bf91 100644 --- a/src/BuildingPlacer.cpp +++ b/src/BuildingPlacer.cpp @@ -79,7 +79,7 @@ bool BuildingPlacer::canBuildHereWithSpace(int bx, int by, const UnitType & type // TODO: recalculate start and end positions for addons // if this rectangle doesn't fit on the map we can't build here - if (startx < 0 || starty < 0 || endx > m_bot.Map().width() || endx < bx + width - xdelta || endy > m_bot.Map().height() || endy < bx + height - ydelta) + if (startx < 0 || starty < 0 || endx > m_bot.Map().width() || endx < bx + width - xdelta || endy > m_bot.Map().height() || endy < by + height - ydelta) { return false; }