From 17fdf1511fd2c82383b8e4d01ac7ca7b759f9a5a Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Wed, 25 Oct 2017 15:47:36 +0200 Subject: [PATCH] Clear entrance/exit location if no entrance or exit is found --- src/openrct2/ride/ride.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/openrct2/ride/ride.c b/src/openrct2/ride/ride.c index 06bfa2f6a0..51f28ee23f 100644 --- a/src/openrct2/ride/ride.c +++ b/src/openrct2/ride/ride.c @@ -8335,6 +8335,18 @@ void fix_ride_entrance_and_exit_locations() } } } + + if (fixEntrance && !alreadyFoundEntrance) + { + ride->entrances[stationIndex].xy = RCT_XY8_UNDEFINED; + log_info("Cleared disconnected entrance of ride %d, station %d.", rideIndex, stationIndex); + + } + if (fixExit && !alreadyFoundExit) + { + ride->exits[stationIndex].xy = RCT_XY8_UNDEFINED; + log_info("Cleared disconnected exit of ride %d, station %d.", rideIndex, stationIndex); + } } } }