Doom II monster exclusion bug

The Doom II monster exclusion bug is a logic bug in vanilla Doom's  function.

Background
When developing Doom II, the id team added a number of new monster types. However, only doom2.wad contains the sprites needed for these new monsters; if a developer tried to load a level containing Doom II monsters using doom.wad, the game would have crashed.

To work around this problem, the following code was added to, the function in the Doom source code that spawns every item in a level when it is loaded:

spawn = true; // Do not spawn cool, new monsters if !commercial if ( gamemode != commercial) {       switch(mt->type) {         case 68:	// Arachnotron case 64:	// Archvile case 88:	// Boss Brain case 89:	// Boss Shooter case 69:	// Hell Knight case 67:	// Mancubus case 71:	// Pain Elemental case 65:	// Former Human Commando case 66:	// Revenant case 84:	// Wolf SS             spawn = false; break; }   }    if (spawn == false) break;

The bug
In the above code snippet, the final  statement should have read. The unintentional effect is that once a Doom II monster type is encountered, no more items will be spawned at all, when the intention was that only that one monster should not be spawned.

Various source ports have different behaviors related to this code, or fix it in different ways:


 * Bug is not fixed (the vanilla behavior is preserved) - true for Chocolate Doom
 * Bug is fixed and logic is retained (ie. will not spawn Doom II monsters) - true for Boom, MBF
 * Special behavior for Doom II monsters is removed entirely - true for ZDoom-based ports and PrBoom.

One side effect of this bug is that it is not possible for Dehacked patch authors to reuse the Doom II monster thing types if developing Dehacked patches for use with Doom.