Mercurial > hg > openttd
changeset 17383:028cef4dc3bd draft
(svn r22129) -Codechange: use simpler check to test if there any towns in the game
author | smatz <smatz@openttd.org> |
---|---|
date | Tue, 22 Feb 2011 22:21:20 +0000 |
parents | 08c0835d8f63 |
children | b940ad141911 |
files | src/saveload/afterload.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -682,7 +682,7 @@ } /* 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();