1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-25 13:14:19 +01:00

Codechange: Use EnumBitSet for HouseZones. (#14137)

This commit is contained in:
Peter Nelson
2025-04-28 20:27:43 +01:00
committed by GitHub
parent f5a9eae8b1
commit 2c4897c2cd
20 changed files with 238 additions and 233 deletions

View File

@@ -331,7 +331,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(uint8_t local_id, uint32_t
case 0x44: return GetTileOwner(this->tile).base();
/* Get town zone and Manhattan distance of closest town */
case 0x45: return GetTownRadiusGroup(t, this->tile) << 16 | ClampTo<uint16_t>(DistanceManhattan(this->tile, t->xy));
case 0x45: return to_underlying(GetTownRadiusGroup(t, this->tile)) << 16 | ClampTo<uint16_t>(DistanceManhattan(this->tile, t->xy));
/* Get square of Euclidean distance of closest town */
case 0x46: return DistanceSquare(this->tile, t->xy);