road_cmd.c
changeset 3560 4389ae5ad967
parent 3491 4c8427796c64
child 3636 d87b21df2944
--- a/road_cmd.c	Sat Apr 15 19:52:58 2006 +0000
+++ b/road_cmd.c	Sat Apr 15 20:07:42 2006 +0000
@@ -47,11 +47,8 @@
 	// Only do the special processing for actual players.
 	if (_current_player >= MAX_PLAYERS) return true;
 
-	if (IsTileType(tile, MP_STREET) && IsLevelCrossing(tile)) {
-		owner = GetCrossingRoadOwner(tile);
-	} else {
-		owner = GetTileOwner(tile);
-	}
+	owner = IsLevelCrossingTile(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile);
+
 	// Only do the special processing if the road is owned
 	// by a town
 	if (owner != OWNER_TOWN) {
@@ -112,7 +109,7 @@
 
 	if (!IsTileType(tile, MP_STREET) && !IsTileType(tile, MP_TUNNELBRIDGE)) return CMD_ERROR;
 
-	owner = IsLevelCrossing(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile);
+	owner = IsLevelCrossingTile(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile);
 
 	if (owner == OWNER_TOWN && _game_mode != GM_EDITOR) {
 		if (IsTileType(tile, MP_TUNNELBRIDGE)) { // index of town is not saved for bridge (no space)