Skip to content

Commit

Permalink
fix: ignore items with elevation
Browse files Browse the repository at this point in the history
  • Loading branch information
phacUFPE committed Aug 15, 2024
1 parent e895a12 commit 34fb490
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/main_menubar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ namespace SearchDuplicatedItems {
if (foundTiles.count(tile) == 0) {
std::unordered_set<int> itemIDs;
for (Item* existingItem : tile->items) {
if (itemIDs.count(existingItem->getID()) > 0) {
if (itemIDs.count(existingItem->getID()) > 0 && !existingItem->hasElevation()) {
foundTiles.insert(tile);
break;
}
Expand Down Expand Up @@ -2466,9 +2466,9 @@ namespace RemoveDuplicatesItems {
}

std::unordered_set<int> itemIDsDuplicates;
for (Item* itemInTile : tile->items) {
for (const auto &itemInTile : tile->items) {
if (itemInTile && itemInTile->getID() == item->getID()) {
if (itemIDsDuplicates.count(itemInTile->getID()) > 0) {
if (itemIDsDuplicates.count(itemInTile->getID()) > 0 && !itemInTile->hasElevation()) {
itemIDsDuplicates.clear();
return true;
}
Expand Down

0 comments on commit 34fb490

Please sign in to comment.