Ouch face

Due to a bug in the original Doom source code, the HUD graphic "STFOUCH*" which displays a face of shock and pain is seen only rarely and for a long time was considered almost random. The code relating to the bug is as follows (comments added for clarity):

if (plyr->health - st_oldhealth > ST_MUCHPAIN) // ST_MUCHPAIN is 20 {     st_facecount = ST_TURNCOUNT;  // ST_TURNCOUNT is 35 st_faceindex = ST_calcPainOffset + ST_OUCHOFFSET; // ST_OUCHOFFSET is 5 }

The relevant portion is in the first line, which essentially states that the OUCH face will only appear if the player's current health is more than 20 points greater than their old health, i.e. their health in the previous tic. Since this portion of code is only called when the player receives damage, it is impossible through normal play for a player receiving damage to end up with a great deal more health than he started with.

There are several ways to see the OUCH face: one is to start a level with the player standing on a damaging floor sector, presumably because the immediate damage means the "old" health is an invalid quantity since the level has just started. Another way is to receive damage while simultaneously picking up a large health pickup, i.e. being hit by a rocket and knocked over a supercharge, resulting in a health which is far greater than it was before the series of events took place.

Due to the strange nature of the OUCH face, a long-held assumption among players was that the OUCH face only appeared as a sort of "surprise" or a "I can't believe I survived that" moment. However, the obvious error in the code makes it clear that the OUCH face was originally supposed to appear any time the player received over 20 points of damage at one time. Since such events occur frequently during gameplay, especially in Doom 2, it is curious that id Software never noticed the error.

Some modern source ports such as ZDoom have "fixed" the code, resulting in behavior which was never actually present in the original Doom but correcting what could nevertheless be considered a "bug".