diff --git a/src/openrct2/Cheats.cpp b/src/openrct2/Cheats.cpp index 76d952ffdf..80e51d7860 100644 --- a/src/openrct2/Cheats.cpp +++ b/src/openrct2/Cheats.cpp @@ -105,7 +105,7 @@ static void cheat_fix_vandalism() if (!(it.element)->AsPath()->HasAddition()) continue; - it.element->flags &= ~TILE_ELEMENT_FLAG_BROKEN; + it.element->AsPath()->SetIsBroken(false); } while (tile_element_iterator_next(&it)); gfx_invalidate_screen(); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index b51c9608c4..68f2081e05 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -6185,7 +6185,7 @@ static void peep_update_walking_break_scenery(rct_peep* peep) return; } - tileElement->flags |= TILE_ELEMENT_FLAG_BROKEN; + tileElement->AsPath()->SetIsBroken(true); map_invalidate_tile_zoom1(peep->next_x, peep->next_y, (tileElement->base_height << 3) + 32, tileElement->base_height << 3); diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 7c2886c75a..3195e10449 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2080,7 +2080,8 @@ private: uint8_t entryIndex = _pathTypeToEntryMap[pathType]; dst2->SetDirection(0); - dst2->flags &= ~(TILE_ELEMENT_FLAG_BROKEN | TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE); + dst2->SetIsBroken(false); + dst2->SetIsBlockedByVehicle(false); dst2->SetPathEntryIndex(entryIndex); dst2->SetShouldDrawPathOverSupports(true); @@ -2121,7 +2122,7 @@ private: entryIndex = _pathAdditionTypeToEntryMap[normalisedType]; if (additionType != normalisedType) { - dst2->flags |= TILE_ELEMENT_FLAG_BROKEN; + dst2->SetIsBroken(true); } dst2->SetAddition(entryIndex + 1); } diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 22645fd469..25801ef9bf 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -287,9 +287,9 @@ static money32 footpath_element_insert( if (type & FOOTPATH_ELEMENT_INSERT_QUEUE) pathElement->SetIsQueue(true); pathElement->SetAddition(pathItemType); - tileElement->AsPath()->SetRideIndex(RIDE_ID_NULL); - tileElement->AsPath()->SetAdditionStatus(255); - pathElement->flags &= ~TILE_ELEMENT_FLAG_BROKEN; + pathElement->SetRideIndex(RIDE_ID_NULL); + pathElement->SetAdditionStatus(255); + pathElement->SetIsBroken(false); if (flags & GAME_COMMAND_FLAG_GHOST) pathElement->SetGhost(true); @@ -394,7 +394,7 @@ static money32 footpath_element_update( } tileElement->AsPath()->SetAddition(pathItemType); - tileElement->flags &= ~TILE_ELEMENT_FLAG_BROKEN; + tileElement->AsPath()->SetIsBroken(false); if (pathItemType != 0) { rct_scenery_entry* scenery_entry = get_footpath_item_entry(pathItemType - 1); @@ -423,7 +423,7 @@ static money32 footpath_element_update( else tileElement->AsPath()->SetIsQueue(false); tileElement->AsPath()->SetAddition(pathItemType); - tileElement->flags &= ~TILE_ELEMENT_FLAG_BROKEN; + tileElement->AsPath()->SetIsBroken(false); loc_6A6620(flags, x, y, tileElement); } @@ -678,13 +678,13 @@ static money32 footpath_place_from_track( if (slope & FOOTPATH_PROPERTIES_FLAG_IS_SLOPED) pathElement->SetSloped(true); if (type & (1 << 7)) - tileElement->AsPath()->SetIsQueue(true); + pathElement->SetIsQueue(true); pathElement->SetAddition(0); - tileElement->AsPath()->SetRideIndex(RIDE_ID_NULL); - tileElement->AsPath()->SetAdditionStatus(255); - tileElement->AsPath()->SetEdges(edges); - tileElement->AsPath()->SetCorners(0); - pathElement->flags &= ~TILE_ELEMENT_FLAG_BROKEN; + pathElement->SetRideIndex(RIDE_ID_NULL); + pathElement->SetAdditionStatus(255); + pathElement->SetEdges(edges); + pathElement->SetCorners(0); + pathElement->SetIsBroken(false); if (flags & (1 << 6)) pathElement->SetGhost(true);