Update Buildings.cpp

Changed the StockpileIterator::operator++ to checks block based on <= 16 rather than <16. Previously it was not returning items at stockpile tiles at the block boundary. Identified as part of combine.lua changes.
develop
silverflyone 2023-02-15 15:31:50 +11:00
parent 805d68017f
commit d8afb6c682
1 changed files with 2 additions and 2 deletions

@ -1643,10 +1643,10 @@ StockpileIterator& StockpileIterator::operator++() {
while (current >= block->items.size()) {
// Out of items in this block; find the next block to search.
if (block->map_pos.x + 16 < stockpile->x2) {
if (block->map_pos.x + 16 <= stockpile->x2) {
block = Maps::getTileBlock(block->map_pos.x + 16, block->map_pos.y, stockpile->z);
current = 0;
} else if (block->map_pos.y + 16 < stockpile->y2) {
} else if (block->map_pos.y + 16 <= stockpile->y2) {
block = Maps::getTileBlock(stockpile->x1, block->map_pos.y + 16, stockpile->z);
current = 0;
} else {