diff options
author | smatz <smatz@openttd.org> | 2009-05-26 22:45:48 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-26 22:45:48 +0000 |
commit | 5a463c8347fe1e68ab31dda1425e9060d52bfbd6 (patch) | |
tree | 55f5c9de8dcbda6268d003b29af59650594ce27a /src/settings.cpp | |
parent | 7ee882d03f4c41d8659ed82fd5be0d0efbae0a0c (diff) | |
download | openttd-5a463c8347fe1e68ab31dda1425e9060d52bfbd6.tar.xz |
(svn r16442) -Codechange: use new Vehicle accessors at more places
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index fac9a0dfb..ad0ac1de3 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -57,6 +57,7 @@ #include "ai/ai_config.hpp" #include "newgrf.h" #include "engine_base.h" +#include "ship.h" #include "void_map.h" #include "station_base.h" @@ -878,9 +879,9 @@ static bool CheckFreeformEdges(int32 p1) { if (_game_mode == GM_MENU) return true; if (p1 != 0) { - Vehicle *v; - FOR_ALL_VEHICLES(v) { - if (v->type == VEH_SHIP && (TileX(v->tile) == 0 || TileY(v->tile) == 0)) { + Ship *s; + FOR_ALL_SHIPS(s) { + if (TileX(s->tile) == 0 || TileY(s->tile) == 0) { ShowErrorMessage(INVALID_STRING_ID, STR_CONFIG_SETTING_EDGES_NOT_EMPTY, 0, 0); return false; } |