diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 4154b73339..50e38472ac 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -182,6 +182,7 @@ static Widget _rideConstructionWidgets[] = { }; static void WindowRideConstructionMouseUpDemolishNextPiece(const CoordsXYZD& piecePos, int32_t type); + static void WindowRideConstructionUpdateActiveElements(); /* move to ride.c */ static void CloseRideWindowForConstruction(RideId rideId) @@ -4629,4 +4630,10 @@ static Widget _rideConstructionWidgets[] = { WindowRideConstructionUpdateActiveElements(); } } + + static void WindowRideConstructionUpdateActiveElements() + { + auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_UPDATE_ACTIVE_ELEMENTS); + ContextBroadcastIntent(&intent); + } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index ca846c8f49..a52aa03c26 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -1046,7 +1046,6 @@ bool TrackBlockGetPreviousFromZero( void RideGetStartOfTrack(CoordsXYE* output); -void WindowRideConstructionUpdateActiveElements(); money64 RideEntranceExitPlaceGhost( const Ride& ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum); diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index c6eb5ba421..81fba183a8 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -464,6 +464,12 @@ std::optional GetTrackElementOriginAndApplyChanges( return retCoordsXYZ; } +static void WindowRideConstructionUpdateActiveElements() +{ + auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_UPDATE_ACTIVE_ELEMENTS); + ContextBroadcastIntent(&intent); +} + void RideRestoreProvisionalTrackPiece() { if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) diff --git a/src/openrct2/windows/_legacy.cpp b/src/openrct2/windows/_legacy.cpp index 68b100b1c3..6f1832582a 100644 --- a/src/openrct2/windows/_legacy.cpp +++ b/src/openrct2/windows/_legacy.cpp @@ -396,16 +396,6 @@ bool WindowRideConstructionUpdateState( return false; } -/** - * - * rct2: 0x006C84CE - */ -void WindowRideConstructionUpdateActiveElements() -{ - auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_UPDATE_ACTIVE_ELEMENTS); - ContextBroadcastIntent(&intent); -} - /** * * rct2: 0x0066DB3D