1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 13:03:11 +01:00

Part of #13874: Replace TrackCoordinates

This commit is contained in:
frutiemax
2021-08-22 09:42:27 -04:00
parent 5c261b6d2e
commit 80418efafb
8 changed files with 41 additions and 22 deletions

View File

@@ -594,7 +594,9 @@ static void window_track_place_draw_mini_preview_track(
// Change rotation and next position based on track curvature
curTrackRotation &= 3;
const rct_track_coordinates* track_coordinate = &TrackCoordinates[trackType];
using namespace OpenRCT2::TrackMetaData;
const auto& teDescriptor = GetTrackElementDescriptor(trackType);
const rct_track_coordinates* track_coordinate = &teDescriptor.Coordinates;
curTrackStart += CoordsXY{ track_coordinate->x, track_coordinate->y }.Rotate(curTrackRotation);
curTrackRotation += track_coordinate->rotation_end - track_coordinate->rotation_begin;