Mercurial > hg > openttd
changeset 17533:fba9ba4cfafb draft
(svn r22297) -Fix [FS#4580]: the 'freeform edges' setting could be enabled when there were buoys on the northern border (adf88)
author | smatz <smatz@openttd.org> |
---|---|
date | Thu, 07 Apr 2011 15:48:13 +0000 |
parents | cc5d08b3e657 |
children | f1771dc228c2 |
files | src/settings.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/settings.cpp +++ b/src/settings.cpp @@ -1071,13 +1071,15 @@ if (p1 != 0) { Ship *s; FOR_ALL_SHIPS(s) { + /* Check if there is a ship on the northern border. */ if (TileX(s->tile) == 0 || TileY(s->tile) == 0) { ShowErrorMessage(STR_CONFIG_SETTING_EDGES_NOT_EMPTY, INVALID_STRING_ID, WL_ERROR); return false; } } - Station *st; - FOR_ALL_STATIONS(st) { + BaseStation *st; + FOR_ALL_BASE_STATIONS(st) { + /* Check if there is a buoy on the northern border. */ if (TileX(st->xy) == 0 || TileY(st->xy) == 0) { ShowErrorMessage(STR_CONFIG_SETTING_EDGES_NOT_EMPTY, INVALID_STRING_ID, WL_ERROR); return false;