diff options
author | smatz <smatz@openttd.org> | 2011-04-07 15:48:13 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2011-04-07 15:48:13 +0000 |
commit | a8862eb77f0c87c970326d53aa1e03bb1f0920de (patch) | |
tree | a040e44bf315558338e0d67ed7425da1a50bf5de /src/settings.cpp | |
parent | d52dbc714a68ffa3063c4b0603a8eb20ede4f90e (diff) | |
download | openttd-a8862eb77f0c87c970326d53aa1e03bb1f0920de.tar.xz |
(svn r22297) -Fix [FS#4580]: the 'freeform edges' setting could be enabled when there were buoys on the northern border (adf88)
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 0388d35a9..ad93ce6ea 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1071,13 +1071,15 @@ static bool CheckFreeformEdges(int32 p1) 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; |