summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2011-02-22 22:21:20 +0000
committersmatz <smatz@openttd.org>2011-02-22 22:21:20 +0000
commit58c7f5c4976c1422a08664e34485894c8e198109 (patch)
treee875389778a7966befb55129448f903235feab62 /src
parentee111ce1a4cffff6d6efaaec430614d2fc736dd5 (diff)
downloadopenttd-58c7f5c4976c1422a08664e34485894c8e198109.tar.xz
(svn r22129) -Codechange: use simpler check to test if there any towns in the game
Diffstat (limited to 'src')
-rw-r--r--src/saveload/afterload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index c2ac41638..4acd05b70 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -682,7 +682,7 @@ bool AfterLoadGame()
}
/* make sure there is a town in the game */
- if (_game_mode == GM_NORMAL && !ClosestTownFromTile(0, UINT_MAX)) {
+ if (_game_mode == GM_NORMAL && Town::GetNumItems() == 0) {
SetSaveLoadError(STR_ERROR_NO_TOWN_IN_SCENARIO);
/* Restore the signals */
ResetSignalHandlers();