mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r27808) -Codechange: Adjust the size of _track_crosses_trackdirs
_track_crosses_trackdirs is indexed by a Track, not a Trackdir, so adjust its size accordingly. (cirdan)
This commit is contained in:
parent
80303515c1
commit
e3a1ae2be5
@ -56,7 +56,7 @@ extern const Trackdir _next_trackdir[TRACKDIR_END] = {
|
||||
};
|
||||
|
||||
/* Maps a trackdir to all trackdirs that make 90 deg turns with it. */
|
||||
extern const TrackdirBits _track_crosses_trackdirs[TRACKDIR_END] = {
|
||||
extern const TrackdirBits _track_crosses_trackdirs[TRACK_END] = {
|
||||
TRACKDIR_BIT_Y_SE | TRACKDIR_BIT_Y_NW, // TRACK_X
|
||||
TRACKDIR_BIT_X_NE | TRACKDIR_BIT_X_SW, // TRACK_Y
|
||||
TRACKDIR_BIT_RIGHT_N | TRACKDIR_BIT_RIGHT_S | TRACKDIR_BIT_LEFT_N | TRACKDIR_BIT_LEFT_S, // TRACK_UPPER
|
||||
|
@ -594,7 +594,7 @@ static inline TrackdirBits TrackdirReachesTrackdirs(Trackdir trackdir)
|
||||
static inline TrackdirBits TrackdirCrossesTrackdirs(Trackdir trackdir)
|
||||
{
|
||||
assert(IsValidTrackdirForRoadVehicle(trackdir));
|
||||
extern const TrackdirBits _track_crosses_trackdirs[TRACKDIR_END];
|
||||
extern const TrackdirBits _track_crosses_trackdirs[TRACK_END];
|
||||
return _track_crosses_trackdirs[TrackdirToTrack(trackdir)];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user