Fix refurbishment confirmation window not closing in multiplayer mode.

This commit is contained in:
Aaron van Geffen 2018-05-20 11:09:49 +02:00
parent 3f0308a517
commit ca16fe8e62
2 changed files with 2 additions and 8 deletions

View File

@ -204,10 +204,6 @@ static void window_ride_refurbish_mouseup(rct_window *w, rct_widgetindex widgetI
case WIDX_REFURBISH:
{
ride_action_modify(w->number, RIDE_MODIFY_RENEW, GAME_COMMAND_FLAG_APPLY);
if (!(get_ride(w->number)->lifecycle_flags & RIDE_LIFECYCLE_EVER_BEEN_OPENED))
{
window_close(w);
}
break;
}
case WIDX_CANCEL:

View File

@ -115,12 +115,8 @@ public:
switch (_modifyType) {
case RIDE_MODIFY_DEMOLISH:
return DemolishRide(ride);
break;
case RIDE_MODIFY_RENEW:
return RefurbishRide(ride);
break;
default:
break;
}
return std::make_unique<GameActionResult>(GA_ERROR::INVALID_PARAMETERS, STR_CANT_DO_THIS);
@ -379,6 +375,8 @@ private:
res->Position = { x, y, z };
}
window_close_by_number(WC_DEMOLISH_RIDE_PROMPT, _rideIndex);
return res;
}