Codechange: Define INVALID_TOWN as a TownID (#7044)
This commit is contained in:

committed by
Charles Pigott

parent
96854b2b8b
commit
9aecbac2b4
@@ -3335,7 +3335,7 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold)
|
||||
if (!HasTownOwnedRoad(tile)) {
|
||||
TownID tid = GetTownIndex(tile);
|
||||
|
||||
if (tid == (TownID)INVALID_TOWN) {
|
||||
if (tid == INVALID_TOWN) {
|
||||
/* in the case we are generating "many random towns", this value may be INVALID_TOWN */
|
||||
if (_generating_world) return CalcClosestTownFromTile(tile, threshold);
|
||||
assert(Town::GetNumItems() == 0);
|
||||
|
Reference in New Issue
Block a user