During Carmageddon 2 development, there was a problem with people running Carmageddon 2 on “the server”.
The reason one should not, ever, run Carmageddon 2 from “the server” is lost to history, but we know that it wasn’t a small problem. Because small problems are annoying, but not worth spending precious developer effort on during development of a game.
No, this problem was a BIG problem! Someone at Stainless Software spent some time specifically writing code to check for it. Based on the…err… language used in the code, we assume it was not meant to be seen by players. 🙈
However, and happily for us, that code (while disabled) somehow made it all the way into the final retail build.
Carmageddon 2 was developed at Stainless Software on the Isle of Wight, off the coast of England, during 1997 and 1998. It was based on an enhanced version of the Carmageddon 1 engine, and supported 3d acceleration, 3d pedestrians and breakable car models.
Compare the current directory to H:\\
, V:\\
, N:\\
, \\Beelzebub
, \Damien
.
If there is a match, GetComputerName
is called to grab the name of the computer running Carmageddon 2.
\\Beelzebub\Hades\Carma2\List_O_Cunts.TXT
is opened, and a line is appended in the form Who: <name> When: <time>
\\Beelzebub\Hades\Users\Matt\Cock_Heads.TXT
is opened, and a line is appended in the form Who: <name> When: <time>
The message "FATAL ERROR: Do NOT run Carmageddon from the server, you CUNT."
is shown on the screen.
To add insult to injury, the same message is logged to a local Last_Error.TXT
file
Game exits unceremoniously
I had carma2_hw.exe
open in IDA debugger and just idly poking around. I looked at the strings, ordered by length, and spotted \\Beelzebub\Hades\Carma2\List_O_Cunts.TXT
, which looked… interesting!
The only reference to it was from a block of unused code at 0x51a850
. I marked the block of unused code as a function, and IDA allowed me to decompile it.
By patching the executable to call this function from WinMain
(in a similar way to this), we can re-enable the code and try it out :)
To trigger the behavior, I changed my computer name to beelzebub
and created Hades
and Users\Matt
shared folders. I also shared my Carma2 directory, which I mapped to a network drive (H:\
).
With this set up, I ran H:\carma2.exe
. For the first time since who knows when, this code executed and thought I was running Carmageddon 2 from the server! 😎
The Carmageddon 2 credits reveals a certain Matthew was a programmer on Carmageddon 2. He is our prime suspect for implementing this server check and disgraceful error messages!
The check of the current directory against \Damien
will never be true. This looks like a bug caused by not escaping the \
character. It should have been defined as \\\\Damien
in the code instead of \\Damien
.