(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

@@ -246,7 +246,7 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
if (IsTileType(tile, MP_RAILWAY) &&
v->type == VEH_Train &&
IsTileOwner(tile, _local_player) &&
(_m[tile].m5 & 0xFE) == 0xC4) {
IsRailWaypoint(tile)) {
order.type = OT_GOTO_WAYPOINT;
order.flags = 0;
order.station = GetWaypointByTile(tile)->index;