1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix #7829 Rotated information kiosk can cause 'unreachable' messages (#9337)

Some entrance directions were lost upon rotation. Corrected rotation of entrance directions.
This commit is contained in:
aw20368
2019-06-05 03:33:39 -04:00
committed by Aaron van Geffen
parent df263eb1f6
commit 834d1e828a
2 changed files with 5 additions and 5 deletions

View File

@@ -30,6 +30,7 @@
- Fix: [#7884] Unfinished preserved rides can be demolished with quick demolish. - Fix: [#7884] Unfinished preserved rides can be demolished with quick demolish.
- Fix: [#7913] RCT1/RCT2 title sequence timing is off. - Fix: [#7913] RCT1/RCT2 title sequence timing is off.
- Fix: [#7700, #8079, #8969] Crash when unloading buggy custom rides. - Fix: [#7700, #8079, #8969] Crash when unloading buggy custom rides.
- Fix: [#7829] Rotated information kiosk can cause 'unreachable' messages.
- Fix: [#7878] Scroll shortcut keys ignore SHIFT/CTRL/ALT modifiers. - Fix: [#7878] Scroll shortcut keys ignore SHIFT/CTRL/ALT modifiers.
- Fix: [#8219] Faulty folder recreation in "save" folder. - Fix: [#8219] Faulty folder recreation in "save" folder.
- Fix: [#8480, #8535] Crash when mirroring track design. - Fix: [#8480, #8535] Crash when mirroring track design.

View File

@@ -3503,7 +3503,7 @@ static void ride_shop_connected(Ride* ride)
if (trackElement == nullptr) if (trackElement == nullptr)
return; return;
uint16_t entrance_directions = 0; uint8_t entrance_directions = 0;
uint8_t track_type = trackElement->GetTrackType(); uint8_t track_type = trackElement->GetTrackType();
ride = get_ride(trackElement->GetRideIndex()); ride = get_ride(trackElement->GetRideIndex());
if (ride == nullptr) if (ride == nullptr)
@@ -3512,16 +3512,15 @@ static void ride_shop_connected(Ride* ride)
} }
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE))
{ {
entrance_directions = FlatRideTrackSequenceProperties[track_type][0]; entrance_directions = FlatRideTrackSequenceProperties[track_type][0] & 0xF;
} }
else else
{ {
entrance_directions = TrackSequenceProperties[track_type][0]; entrance_directions = TrackSequenceProperties[track_type][0] & 0xF;
} }
uint8_t tile_direction = trackElement->GetDirection(); uint8_t tile_direction = trackElement->GetDirection();
entrance_directions <<= tile_direction; entrance_directions = rol4(entrance_directions, tile_direction);
entrance_directions = ((entrance_directions >> 12) | entrance_directions) & 0xF;
// Now each bit in entrance_directions stands for an entrance direction to check // Now each bit in entrance_directions stands for an entrance direction to check
if (entrance_directions == 0) if (entrance_directions == 0)