(svn r12179) -Codechange: use GetCrossingRailTrack() and GetCrossingRailAxis() to improve code readability

This commit is contained in:
smatz
2008-02-18 18:35:36 +00:00
parent c7a8080c3a
commit 509b3a3247
5 changed files with 16 additions and 5 deletions

View File

@@ -1448,7 +1448,7 @@ static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID n
if (IsLevelCrossing(tile)) {
if (GetTileOwner(tile) == old_player) {
if (new_player == PLAYER_SPECTATOR) {
DoCommand(tile, 0, AxisToTrack(OtherAxis(GetCrossingRoadAxis(tile))), DC_EXEC | DC_BANKRUPT, CMD_REMOVE_SINGLE_RAIL);
DoCommand(tile, 0, GetCrossingRailTrack(tile), DC_EXEC | DC_BANKRUPT, CMD_REMOVE_SINGLE_RAIL);
} else {
SetTileOwner(tile, new_player);
}