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

This commit is contained in:
Peter Froud 2024-03-16 23:28:46 -07:00 committed by Gymnasiast
parent f49fe68cc6
commit 257c2d45d3
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}
}