Old revision #pghr7xyan | New revision #p4zzsjzk5 | ||
---|---|---|---|
1 | static inline Owner GetCanalOwner(TileIndex t) | 1 | static inline Owner GetCanalOwner(TileIndex t) |
2 | { | 2 | { |
3 | | 3 | if (!HasTileWaterGround(t)) return GetTileOwner(t); |
4 | 4 | ||
5 | | 5 | Owner o = (Owner)(GB(_me[t].m6, 0, 2) | (GB(_me[t].m6, 6, 2) << 2)); |
6 | 6 | ||
7 | |||
8 | |||
9 | |||
10 | /* Canals don't need OWNER_TOWN, and remapping OWNER_NONE | 7 | /* Canals don't need OWNER_TOWN, and remapping OWNER_NONE |
11 | | 11 | * to OWNER_TOWN makes it use one bit less. */ |
12 | return o | 12 | return o == OWNER_TOWN ? OWNER_NONE : o; |
13 | } | 10 | } |