1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

Remove duplicate TRACK_ELEMENT_LOCATION_IS_UNDERGROUND flag (#12714)

Renamed all instances to ELEMENT_IS_UNDERGROUND

Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
This commit is contained in:
Simon J
2020-08-18 13:26:03 +01:00
committed by GitHub
parent f2af98b3e8
commit 4c2ce0f892
4 changed files with 4 additions and 9 deletions

View File

@@ -1845,7 +1845,7 @@ static void window_ride_construction_construct(rct_window* w)
}
auto tpar = dynamic_cast<TrackPlaceActionResult*>(res.get());
if (tpar != nullptr && tpar->GroundFlags & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND)
if (tpar != nullptr && tpar->GroundFlags & ELEMENT_IS_UNDERGROUND)
{
viewport_set_visibility(1);
}

View File

@@ -281,7 +281,7 @@ public:
{
if (FlatTrackFlags[_trackType] & TRACK_ELEM_FLAG_ONLY_ABOVE_GROUND)
{
if (res->GroundFlags & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND)
if (res->GroundFlags & ELEMENT_IS_UNDERGROUND)
{
return std::make_unique<TrackPlaceActionResult>(
GA_ERROR::DISALLOWED, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND);
@@ -292,7 +292,7 @@ public:
{
if (TrackFlags[_trackType] & TRACK_ELEM_FLAG_ONLY_ABOVE_GROUND)
{
if (res->GroundFlags & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND)
if (res->GroundFlags & ELEMENT_IS_UNDERGROUND)
{
return std::make_unique<TrackPlaceActionResult>(
GA_ERROR::DISALLOWED, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND);

View File

@@ -528,11 +528,6 @@ enum
TRACK_SEQUENCE_FLAG_DISALLOW_DOORS = (1 << 6), // 0x40
};
enum
{
TRACK_ELEMENT_LOCATION_IS_UNDERGROUND = 2,
};
enum
{
GC_SET_MAZE_TRACK_BUILD = 0,

View File

@@ -104,7 +104,7 @@ money32 place_provisional_track_piece(
_unkF440C5 = { trackPos.x, trackPos.y, trackPos.z + z_begin, static_cast<Direction>(trackDirection) };
_currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_TRACK;
viewport_set_visibility((tpar->GroundFlags & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND) ? 1 : 3);
viewport_set_visibility((tpar->GroundFlags & ELEMENT_IS_UNDERGROUND) ? 1 : 3);
if (_currentTrackSlopeEnd != 0)
viewport_set_visibility(2);