mirror of https://github.com/OpenTTD/OpenTTD
(svn r5911) -Fix [FS#215]: Discard upper bits of TrackdirBitsToTrackBits result.
parent
b13a60db42
commit
49b7b1e0eb
2
rail.h
2
rail.h
|
@ -296,7 +296,7 @@ static inline TrackdirBits TrackToTrackdirBits(Track track)
|
||||||
*/
|
*/
|
||||||
static inline TrackBits TrackdirBitsToTrackBits(TrackdirBits bits)
|
static inline TrackBits TrackdirBitsToTrackBits(TrackdirBits bits)
|
||||||
{
|
{
|
||||||
return (TrackBits)(bits | (bits >> 8));
|
return (TrackBits)((bits | (bits >> 8)) & TRACK_BIT_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue