1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

(svn r3210) -Codechange: use IsRailWaypoint where possible (instead of magicnumbers)

-Codechange: IsRailWaypoint should take 'tile', not 'm5'
This commit is contained in:
truelight
2005-11-16 14:41:01 +00:00
parent b739674307
commit c1b012171d
6 changed files with 12 additions and 11 deletions

View File

@@ -1491,7 +1491,7 @@ static void DrawTile_Track(TileInfo *ti)
if (ti->tileh != 0) DrawFoundation(ti, ti->tileh);
if (IsRailWaypoint(m5) && HASBIT(_m[ti->tile].m3, 4)) {
if (IsRailWaypoint(ti->tile) && HASBIT(_m[ti->tile].m3, 4)) {
// look for customization
const StationSpec *stat = GetCustomStation(STAT_CLASS_WAYP, _m[ti->tile].m4 + 1);
@@ -2100,7 +2100,7 @@ static void ClickTile_Track(TileIndex tile)
{
if (IsTileDepotType(tile, TRANSPORT_RAIL)) {
ShowTrainDepotWindow(tile);
} else if (IsRailWaypoint(_m[tile].m5)) {
} else if (IsRailWaypoint(tile)) {
ShowRenameWaypointWindow(GetWaypointByTile(tile));
}
}