forked from rosebudai/OpenRCT2-Web
Failed track removal was triggering a move to the next piece. Changed to move only upon successful removal.
This commit is contained in:
1 parent
bc14f427a5
commit
02ef545f1b
1 file changed
+5
-2
@@ -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