forked from mirror/OpenTTD
(svn r11910) -Fix: play 'ding-ding' crossing sound in more cases (except gameload and crossing construction)
-Fix: crossing sound is bound to tile, not to vehicle
This commit is contained in:
@@ -191,25 +191,28 @@ static inline TrackBits GetCrossingRailBits(TileIndex tile)
|
||||
return AxisToTrackBits(OtherAxis(GetCrossingRoadAxis(tile)));
|
||||
}
|
||||
|
||||
|
||||
static inline void UnbarCrossing(TileIndex t)
|
||||
{
|
||||
assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
|
||||
ClrBit(_m[t].m4, 5);
|
||||
}
|
||||
|
||||
static inline void BarCrossing(TileIndex t)
|
||||
{
|
||||
assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
|
||||
SetBit(_m[t].m4, 5);
|
||||
}
|
||||
|
||||
static inline bool IsCrossingBarred(TileIndex t)
|
||||
{
|
||||
assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
|
||||
return HasBit(_m[t].m4, 5);
|
||||
}
|
||||
|
||||
static inline void SetCrossingBarred(TileIndex t, bool barred)
|
||||
{
|
||||
assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
|
||||
SB(_m[t].m4, 5, 1, barred);
|
||||
}
|
||||
|
||||
static inline void UnbarCrossing(TileIndex t)
|
||||
{
|
||||
SetCrossingBarred(t, false);
|
||||
}
|
||||
|
||||
static inline void BarCrossing(TileIndex t)
|
||||
{
|
||||
SetCrossingBarred(t, true);
|
||||
}
|
||||
|
||||
#define IsOnDesert IsOnSnow
|
||||
static inline bool IsOnSnow(TileIndex t)
|
||||
{
|
||||
|
Reference in New Issue
Block a user