Change if(elem!=nullptr) to if(elem==nullptr)

This commit is contained in:
Peter Froud authored and Gymnasiast committed 2024-03-30 17:12:54 +01:00
1 parent f49fe68cc6
commit 257c2d45d3
1 file changed
+4 -4
@@ -184,14 +184,14 @@ GameActions::Result LargeSceneryRemoveAction::Execute() const
}
auto* sceneryElement = FindLargeSceneryElement(currentTile, i);
if (sceneryElement != nullptr)
if (sceneryElement == nullptr)
{
MapInvalidateTileFull(currentTile);
TileElementRemove(sceneryElement);
LOG_ERROR("Tile not found when trying to remove element!");
}
else
{
LOG_ERROR("Tile not found when trying to remove element!");
MapInvalidateTileFull(currentTile);
TileElementRemove(sceneryElement);
}
}