# HG changeset patch # User smatz # Date 2011-02-22 22:21:20 # Node ID 97cac55958cb9cd54d5155d2ced18a4ff537b21b # Parent 5735d885db8e92bb9bea291d6908e9d93e493aa0 (svn r22129) -Codechange: use simpler check to test if there any towns in the game diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp --- 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();