Do not clear construction / peeps for ghost entrance / exits

This commit is contained in:
Ted John 2019-05-28 16:53:31 +01:00
parent 1dd696d453
commit 63b1649666
2 changed files with 11 additions and 5 deletions

View File

@ -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);

View File

@ -123,9 +123,12 @@ public:
return std::make_unique<GameActionResult>(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);