Fix refurbishment confirmation window not closing in multiplayer mode.

This commit is contained in:
Aaron van Geffen committed 2018-05-23 16:33:37 +02:00
1 parent 3f0308a517
commit ca16fe8e62
2 files changed
+2 -8

No files matched your search

@@ -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:
+2 -4
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;
}