Add GetTileTrackStatus wrapper for when red signals part is not needed

This commit is contained in:
Jonathan G Rennison
2023-03-04 01:50:18 +00:00
parent ae7c86c49d
commit 4ec6a99dd8
26 changed files with 56 additions and 46 deletions

View File

@@ -62,11 +62,11 @@
DiagDirection to_other_tile = ::DiagdirBetweenTiles(t2, t1);
/* Determine the reachable tracks from the shared edge */
TrackBits gtts1 = ::TrackStatusToTrackBits(::GetTileTrackStatus(t1, TRANSPORT_WATER, 0, ReverseDiagDir(to_other_tile))) & ::DiagdirReachesTracks(to_other_tile);
TrackBits gtts1 = ::TrackdirBitsToTrackBits(::GetTileTrackdirBits(t1, TRANSPORT_WATER, 0, ReverseDiagDir(to_other_tile))) & ::DiagdirReachesTracks(to_other_tile);
if (gtts1 == TRACK_BIT_NONE) return false;
to_other_tile = ReverseDiagDir(to_other_tile);
TrackBits gtts2 = ::TrackStatusToTrackBits(::GetTileTrackStatus(t2, TRANSPORT_WATER, 0, ReverseDiagDir(to_other_tile))) & ::DiagdirReachesTracks(to_other_tile);
TrackBits gtts2 = ::TrackdirBitsToTrackBits(::GetTileTrackdirBits(t2, TRANSPORT_WATER, 0, ReverseDiagDir(to_other_tile))) & ::DiagdirReachesTracks(to_other_tile);
return gtts2 != TRACK_BIT_NONE;
}