The Doom 3 source code has been released, as was promised by John Carmack earlier this year at QuakeCon, though there have been a few minor tweaks, Gamasutra reports
Apparently Carmack has done a slight rewrite to the code to avoid any patent infringements, which contains no game data. The ability to use "Carmack's Reverse" which is the rendering of stencil shadows through Depth Field has also been removed to avoid any legal issues. Carmack Tweeted
that he "added four lines of code and and changed two".
You can grab the source code locally from AusGamers