diff --git a/src/ride/ride.c b/src/ride/ride.c index d641310726..34a1c524cb 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -4320,7 +4320,7 @@ static void ride_set_boat_hire_return_point(rct_ride *ride, rct_xy_element *star }; trackType = returnTrackElement->properties.track.type; - int elementReturnDirection = RCT2_GLOBAL(0x009968BB + (trackType * 10), uint8); + int elementReturnDirection = TrackCoordinates[trackType].rotation_begin; ride->boat_hire_return_direction = (returnTrackElement->type + elementReturnDirection) & 3; ride->boat_hire_return_position = (returnX >> 5) | ((returnY >> 5) << 8); } diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index 2f6338906a..462a9ca4aa 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -2729,7 +2729,7 @@ money32 sub_6CA162(int rideIndex, int trackType, int trackDirection, int edxRS16 RCT2_GLOBAL(0x00F440C7, uint16) = y; z += ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) ? RCT2_GLOBAL(0x009972BD + (trackType * 10), uint16) : - RCT2_GLOBAL(0x009968BD + (trackType * 10), uint16); + TrackCoordinates[trackType].z_begin; RCT2_GLOBAL(0x00F440C9, uint16) = z; RCT2_GLOBAL(0x00F440CB, uint8) = trackDirection; diff --git a/src/world/map.c b/src/world/map.c index 592abede19..19b9213a7f 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -3175,11 +3175,11 @@ static bool map_place_fence_check_obstruction_with_track(rct_scenery_entry *wall } if (TrackDefinitions[trackType].bank_start == 0) { - if (!(RCT2_ADDRESS(0x009968BB, uint8)[trackType * 10] & 4)) { + if (!(TrackCoordinates[trackType].rotation_begin & 4)) { direction = (trackElement->type & 3) ^ 2; if (direction == edge) { trackBlock = &TrackBlocks[trackType][sequence]; - z = RCT2_GLOBAL(0x009968BD + (trackType * 10), uint8); + z = TrackCoordinates[trackType].z_begin; z = trackElement->base_height + ((z - trackBlock->z) * 8); if (z == z0) { return true; @@ -3198,7 +3198,7 @@ static bool map_place_fence_check_obstruction_with_track(rct_scenery_entry *wall return false; } - direction = RCT2_ADDRESS(0x009968BC, uint8)[trackType * 10]; + direction = TrackCoordinates[trackType].rotation_end; if (direction & 4) { return false; } @@ -3209,7 +3209,7 @@ static bool map_place_fence_check_obstruction_with_track(rct_scenery_entry *wall } trackBlock = &TrackBlocks[trackType][sequence]; - z = RCT2_GLOBAL(0x009968BF + (trackType * 10), uint8); + z = TrackCoordinates[trackType].z_end; z = trackElement->base_height + ((z - trackBlock->z) * 8); if (z != z0) { return false;