mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-06 22:37:22 +00:00
(svn r8392) -Fix
Use HASBIT() instead of implementing it manually
This commit is contained in:
parent
20e0a91506
commit
09502deabe
@ -172,7 +172,7 @@ protected:
|
|||||||
// rail transport is possible only on compatible rail types
|
// rail transport is possible only on compatible rail types
|
||||||
if (IsRailTT()) {
|
if (IsRailTT()) {
|
||||||
RailType rail_type = GetTileRailType(m_new_tile, TrackdirToTrack(DiagdirToDiagTrackdir(m_exitdir)));
|
RailType rail_type = GetTileRailType(m_new_tile, TrackdirToTrack(DiagdirToDiagTrackdir(m_exitdir)));
|
||||||
if (((1 << rail_type) & m_veh->u.rail.compatible_railtypes) == 0) {
|
if (!HASBIT(m_veh->u.rail.compatible_railtypes, rail_type)) {
|
||||||
// incompatible rail type
|
// incompatible rail type
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user