(svn r7451) -Fix (7372): GetNum(Towns|Industries) should return the actual number of towns and industries.

-Fix (6055): GetMax(Town|Industry)Index should not return the number of towns or industries - 1, but the size of the pool - 1.
This commit is contained in:
rubidium
2006-12-09 14:14:51 +00:00
parent 37b4075385
commit af5c73c12e
4 changed files with 8 additions and 6 deletions

2
town.h
View File

@@ -171,7 +171,7 @@ static inline TownID GetMaxTownIndex(void)
* _really_ returns the highest index. Now it just returns
* the next safe value we are sure about everything is below.
*/
return _total_towns - 1;
return GetTownPoolSize() - 1;
}
static inline uint GetNumTowns(void)