mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-25 21:24:12 +01:00
Codechange: make TownID an enum
This commit is contained in:
@@ -1008,7 +1008,7 @@ bool AfterLoadGame()
|
||||
if ((GB(t.m5(), 4, 2) == ROAD_TILE_CROSSING ? (Owner)t.m3() : GetTileOwner(t)) == OWNER_TOWN) {
|
||||
SetTownIndex(t, CalcClosestTownFromTile(t)->index);
|
||||
} else {
|
||||
SetTownIndex(t, 0);
|
||||
SetTownIndex(t, TOWN_BEGIN);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1232,7 +1232,7 @@ bool AfterLoadGame()
|
||||
GetRailType(t)
|
||||
);
|
||||
} else {
|
||||
TownID town = IsTileOwner(t, OWNER_TOWN) ? ClosestTownFromTile(t, UINT_MAX)->index : 0;
|
||||
TownID town = IsTileOwner(t, OWNER_TOWN) ? ClosestTownFromTile(t, UINT_MAX)->index : TOWN_BEGIN;
|
||||
|
||||
/* MakeRoadNormal */
|
||||
SetTileType(t, MP_ROAD);
|
||||
|
||||
Reference in New Issue
Block a user