diff --git a/src/openrct2/editor.c b/src/openrct2/editor.c index a65598d651..621a494f66 100644 --- a/src/openrct2/editor.c +++ b/src/openrct2/editor.c @@ -594,7 +594,7 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s } break; case EDIT_SCENARIOOPTIONS_SETAVERAGECASHPERGUEST: - + gGuestInitialCash = max(MONEY(0, 00), min(MONEY(1000, 00), *edx)); break; case EDIT_SCENARIOOPTIONS_SETGUESTINITIALHAPPINESS: diff --git a/src/openrct2/windows/editor_scenario_options.c b/src/openrct2/windows/editor_scenario_options.c index 2745dbeff5..f8813b6e0c 100644 --- a/src/openrct2/windows/editor_scenario_options.c +++ b/src/openrct2/windows/editor_scenario_options.c @@ -863,7 +863,15 @@ static void window_editor_scenario_options_guests_mousedown(sint32 widgetIndex, switch (widgetIndex) { case WIDX_CASH_PER_GUEST_INCREASE: if (gGuestInitialCash < MONEY(1000, 00)) { - gGuestInitialCash += MONEY(1, 00); + game_do_command( + 0, + GAME_COMMAND_FLAG_APPLY, + EDIT_SCENARIOOPTIONS_SETAVERAGECASHPERGUEST, + gGuestInitialCash + MONEY(1, 00), + GAME_COMMAND_EDIT_SCENARIO_OPTIONS, + 0, + 0 + ); } else { window_error_open(STR_CANT_INCREASE_FURTHER, STR_NONE); } @@ -871,7 +879,15 @@ static void window_editor_scenario_options_guests_mousedown(sint32 widgetIndex, break; case WIDX_CASH_PER_GUEST_DECREASE: if (gGuestInitialCash > MONEY(0, 00)) { - gGuestInitialCash -= MONEY(1, 00); + game_do_command( + 0, + GAME_COMMAND_FLAG_APPLY, + EDIT_SCENARIOOPTIONS_SETAVERAGECASHPERGUEST, + gGuestInitialCash - MONEY(1, 00), + GAME_COMMAND_EDIT_SCENARIO_OPTIONS, + 0, + 0 + ); } else { window_error_open(STR_CANT_REDUCE_FURTHER, STR_NONE); }