1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-29 15:14:33 +01:00

Codechange: Use EnumBitSet for ObjectFlags. (#13441)

This commit is contained in:
Peter Nelson
2025-02-02 21:15:03 +00:00
committed by GitHub
parent 6f8b9fc737
commit e114ed357d
6 changed files with 48 additions and 49 deletions

View File

@@ -480,7 +480,7 @@ CommandCost CmdBuildBridge(DoCommandFlag flags, TileIndex tile_end, TileIndex ti
case MP_OBJECT: {
const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
if ((spec->flags & OBJECT_FLAG_ALLOW_UNDER_BRIDGE) == 0) goto not_valid_below;
if (!spec->flags.Test(ObjectFlag::AllowUnderBridge)) goto not_valid_below;
if (GetTileMaxZ(tile) + spec->height > z_start) goto not_valid_below;
break;
}