From 63b16496664d9726f45cb7c001d9a261cb0acb2a Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 28 May 2019 16:53:31 +0100 Subject: [PATCH] Do not clear construction / peeps for ghost entrance / exits --- src/openrct2/actions/RideEntranceExitPlaceAction.hpp | 7 +++++-- src/openrct2/actions/RideEntranceExitRemoveAction.hpp | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/openrct2/actions/RideEntranceExitPlaceAction.hpp b/src/openrct2/actions/RideEntranceExitPlaceAction.hpp index 97bdb28ac8..3dd6ebc504 100644 --- a/src/openrct2/actions/RideEntranceExitPlaceAction.hpp +++ b/src/openrct2/actions/RideEntranceExitPlaceAction.hpp @@ -153,8 +153,11 @@ public: return MakeResult(GA_ERROR::INVALID_PARAMETERS, errorTitle); } - ride_clear_for_construction(ride); - ride_remove_peeps(ride); + if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) + { + ride_clear_for_construction(ride); + ride_remove_peeps(ride); + } const auto location = _isExit ? ride_get_exit_location(ride, _stationNum) : ride_get_entrance_location(ride, _stationNum); diff --git a/src/openrct2/actions/RideEntranceExitRemoveAction.hpp b/src/openrct2/actions/RideEntranceExitRemoveAction.hpp index 88ce3f3536..0b67bbddf0 100644 --- a/src/openrct2/actions/RideEntranceExitRemoveAction.hpp +++ b/src/openrct2/actions/RideEntranceExitRemoveAction.hpp @@ -123,9 +123,12 @@ public: return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_NONE); } - ride_clear_for_construction(ride); - ride_remove_peeps(ride); - invalidate_test_results(ride); + if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) + { + ride_clear_for_construction(ride); + ride_remove_peeps(ride); + invalidate_test_results(ride); + } bool found = false; TileElement* tileElement = map_get_first_element_at(_loc.x / 32, _loc.y / 32);