mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Failed track removal was triggering a move to the next piece. Changed to move only upon successful removal.
This commit is contained in:
committed by
Michael Steenbeek
parent
bc14f427a5
commit
02ef545f1b
@@ -1932,12 +1932,15 @@ static void window_ride_construction_mouseup_demolish(rct_window* w)
|
||||
{ _currentTrackBegin.x, _currentTrackBegin.y, _currentTrackBegin.z, _currentTrackPieceDirection });
|
||||
|
||||
trackRemoveAction.SetCallback([=](const GameAction* ga, const GameActionResult* result) {
|
||||
_stationConstructed = get_ride(w->number)->num_stations != 0;
|
||||
window_ride_construction_mouseup_demolish_next_piece(x, y, z, direction, type);
|
||||
if (result->Error != GA_ERROR::OK)
|
||||
{
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
else
|
||||
{
|
||||
_stationConstructed = get_ride(w->number)->num_stations != 0;
|
||||
window_ride_construction_mouseup_demolish_next_piece(x, y, z, direction, type);
|
||||
}
|
||||
});
|
||||
|
||||
GameActions::Execute(&trackRemoveAction);
|
||||
|
||||
Reference in New Issue
Block a user