Sync "Set forbid tree removal"

This commit is contained in:
wolfreak99 2017-02-23 09:57:33 -05:00 committed by Michael Steenbeek
parent 44c4328b36
commit bc8cf81ff1
2 changed files with 15 additions and 2 deletions

View File

@ -662,7 +662,12 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s
window_invalidate_by_class(WC_PARK_INFORMATION);
break;
case EDIT_SCENARIOOPTIONS_SETFORBIDTREEREMOVAL:
if (*edx != FALSE) {
gParkFlags |= PARK_FLAGS_FORBID_TREE_REMOVAL;
}
else {
gParkFlags &= ~PARK_FLAGS_FORBID_TREE_REMOVAL;
}
break;
case EDIT_SCENARIOOPTIONS_SETFORBIDLANDSCAPECHANGES:

View File

@ -1143,7 +1143,15 @@ static void window_editor_scenario_options_park_mouseup(rct_window *w, sint32 wi
window_editor_scenario_options_set_page(w, widgetIndex - WIDX_TAB_1);
break;
case WIDX_FORBID_TREE_REMOVAL:
gParkFlags ^= PARK_FLAGS_FORBID_TREE_REMOVAL;
game_do_command(
0,
GAME_COMMAND_FLAG_APPLY,
EDIT_SCENARIOOPTIONS_SETFORBIDTREEREMOVAL,
gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL ? FALSE : TRUE,
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
0,
0
);
window_invalidate(w);
break;
case WIDX_FORBID_LANDSCAPE_CHANGES: