(svn r16934) -Codechange: introduce a simple helper function to check whether a station is pending deletion or not

This commit is contained in:
rubidium
2009-07-24 07:38:10 +00:00
parent fb36ebd9dd
commit 7b07e93b89
6 changed files with 19 additions and 8 deletions

View File

@@ -638,7 +638,7 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed)
FOR_ALL_BASE_STATIONS(st) {
/* There can be buoys, remove them */
if (IsBuoyTile(st->xy)) DoCommand(st->xy, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR);
if ((st->facilities & ~FACIL_WAYPOINT) == 0) delete st;
if (!st->IsInUse()) delete st;
}
MarkWholeScreenDirty();