File diff r5115:7edde0aba70e → r5116:6ab72109f482
station_cmd.c
Show inline comments
 
@@ -1355,12 +1355,15 @@ int32 DoConvertStationRail(TileIndex til
 

	
 
	// tile is not a railroad station?
 
	if (!IsRailwayStation(tile)) return CMD_ERROR;
 

	
 
	if (GetRailType(tile) == totype) return CMD_ERROR;
 

	
 
	// 'hidden' elrails can't be downgraded to normal rail when elrails are disabled
 
	if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR;
 

	
 
	if (exec) {
 
		SetRailType(tile, totype);
 
		MarkTileDirtyByTile(tile);
 
		YapfNotifyTrackLayoutChange(tile, GetRailStationTrack(tile));
 
	}