From ff6bfdced3866b6d8a935db8ea2b33968257c8a7 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Mon, 7 Mar 2016 19:04:48 +0000 Subject: [PATCH] Revert #3104. Fix #3100 --- src/ride/ride.c | 2 +- src/world/footpath.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ride/ride.c b/src/ride/ride.c index f0aeba1c72..9e85a9be3d 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -7795,7 +7795,7 @@ void sub_6CB945(int rideIndex) } mapElement->properties.entrance.index &= 0x8F; - mapElement->properties.entrance.index |= stationId; + mapElement->properties.entrance.index |= stationId << 4; shouldRemove = false; } while (!map_element_is_last_for_tile(trackElement++)); diff --git a/src/world/footpath.c b/src/world/footpath.c index 078b136e8a..4a262feb34 100644 --- a/src/world/footpath.c +++ b/src/world/footpath.c @@ -52,7 +52,8 @@ static const uint16 EntranceDirections[] = { static int entrance_get_directions(rct_map_element *mapElement) { uint8 entranceType = mapElement->properties.entrance.type; - return EntranceDirections[(entranceType * 8)]; + uint8 sequence = mapElement->properties.entrance.index & 0x0F; + return EntranceDirections[(entranceType * 8) + sequence]; } static bool entrance_has_direction(rct_map_element *mapElement, int direction)