From 58c7f5c4976c1422a08664e34485894c8e198109 Mon Sep 17 00:00:00 2001 From: smatz Date: Tue, 22 Feb 2011 22:21:20 +0000 Subject: [PATCH] (svn r22129) -Codechange: use simpler check to test if there any towns in the game --- src/saveload/afterload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index c2ac416385..4acd05b706 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();