From 785dc43f6b8adf6fa9d6ecac95d0d7abfc1bf5f1 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Fri, 5 Oct 2018 12:30:58 +0200 Subject: [PATCH] Remove residual access to additions field It looks like neighbour_list_push() never actually reads the contents of the station index, it just compares it to other tiles. Therefore, this should work. --- src/openrct2/world/Footpath.cpp | 4 ++-- src/openrct2/world/TileElement.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index f216d57a59..67e5591669 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -1441,7 +1441,7 @@ static void loc_6A6D7E( { neighbour_list_push( neighbourList, 4, direction, tileElement->properties.path.ride_index, - tileElement->properties.path.additions); + tileElement->AsPath()->GetStationIndex()); } else { @@ -1451,7 +1451,7 @@ static void loc_6A6D7E( { neighbour_list_push( neighbourList, 3, direction, tileElement->properties.path.ride_index, - tileElement->properties.path.additions); + tileElement->AsPath()->GetStationIndex()); } } } diff --git a/src/openrct2/world/TileElement.h b/src/openrct2/world/TileElement.h index 61da534d1f..47b7ba36a3 100644 --- a/src/openrct2/world/TileElement.h +++ b/src/openrct2/world/TileElement.h @@ -188,8 +188,8 @@ assert_struct_size(SurfaceElement, 8); struct PathElement : TileElementBase { private: - uint8_t entryIndex; // 4 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is diagonal, 0x03 Rotation - uint8_t additions; // 5 + uint8_t entryIndex; // 4, 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is sloped, 0x03 Rotation + uint8_t additions; // 5, 0bGSSSAAAA: G = Ghost, S = station index, A = addition (0 means no addition) uint8_t edges; // 6 union {