After a slight legal setback, id finally released Doom 3's source code to the general public.
The legal issue involved a piece of technology incorporated in the game called 'Carmack's Reverse', which sounds like a snowboard trick but actually is used to help render shadows in Doom 3.
The problem was that it wasn't developed by Carmack alone, but rather a lot of programmers and as a result ended up as property of Creative Labs. A deal was worked out that allowed id to use the technology in Doom 3, free of charge.
So Carmack got to work on rewriting some of the code, which only required the addition of four new lines of code and changes to two others.
No game data is included with the source code as it is still covered by the original EULA. You can find the code over on GitHub.