Fast doors make two closing sounds

Beginning with the Doom II engine, moving walls and ceilings (e.g. doors, lifts, rising stairs, crushers) may be either normal or "blazing": blazing sectors rise or fall much more rapidly than normal sectors.

When the player closes a blazing door by walking up to it and pressing "action" (the space bar in vanilla Doom), the expected sound effect (DSBDCLS) is heard. When a blazing door is allowed to close by itself, however, the same sound effect is played twice.

Technical
The cause of this is found in p_doors.c, in the function T_VerticalDoor. This function is the thinker function which animates doors.

The code which causes the door to move downward includes a check to see if the door has reached its destination. If this has happened, the door stops moving. For some reason, extra code is included which causes the "blazing door closing" sound to be played when this happens. The code is as follows:

if (res == pastdest)  /* If ths door has reached its destination */ { switch(door->type) {  case blazeRaise:   /* If this is a "blazing" door */ case blazeClose: door->sector->specialdata = NULL; P_RemoveThinker (&door->thinker); // unlink and free /* Play the blazing door close sound */ S_StartSound((mobj_t *)&door->sector->soundorg,         sfx_bdcls); break; ... } } ...

As the sound is already played when the door starts to close, the sound is played twice when a blazing door closes, once when it starts to close, and once when it has finished closing.

PrBoom fixes this bug by default, but allows it to be re-enabled in the Doom Compatibility menu.

Demo files

 * [[Media:D217bdb1.lmp|The door double-closing bug]] (file info) on MAP17: Tenements