Sound propagation

Sound propagation is a system in the Doom engine in which the "sound" emitted by player weapons can travel through the level, alerting monsters. Note that this is purely an issue of game mechanics, and is unrelated to actual audio &mdash; only attacks emit sound as far as this system is concerned. For example, selecting the chainsaw will cause sounds to be played, but this does not count as a sound for alerting monster. Inversely, punching the air is a silent action in-game, but since the player presses the attack button to trigger this action, it can be heard by monsters.

Technical
When a player hits the attack button, the function is called. This function checks that the player has enough ammo, and if so sets the player and its weapon in the relevant states, and also calls. This means that the alert is sounded as soon as the button is pressed; not when the weapon actually fires. A weapon with a long loading time, such as the BFG 9000, can be used to propagate sound in a sector and shoot in another (after taking a teleporter or opening a door) without alerting the monsters in the second area.

Sectors have a pointer. When is called, it calls  for the player's current sector. This latter function sets the sector's pointer to the player's mobj, then looks at each of the sector's lines. For every two-sided line, if the other sector has a height between floor and ceiling greater than 0, the function will recursively call itself for the other side's sector. If the two-sided line is marked as sound-blocking, the recursive call will take this into account by marking the sound as having been blocked once; and if the sound had already been blocked once already, it will not propagate to the other side of this line.

When monsters call the A_Look function, they check if their sector has a valid. If so, they start chasing it, unless they are lying in ambush and wait for the player to enter their line of sight. But even an ambush monster will be woken up by a soundtarget, getting 360° vision.

Once a sector's is set, it cannot normally be unset. Monsters that appear in the sector after the sound has been emitted (spawned, teleported, or resurrected there) will be woken up as if the sound had happened while they were there.

Note that since propagation is sector-based, sound can propagate across noncontiguous space by way of joined sectors.

Silent weapons
Strife features two silent weapons, the punch dagger and the crossbow with poison bolts. This is implemented by the engine checking if the player's weapon is one such sneaky weapon in the function, and not calling  in that case. This feature is exclusive to Strife, though some advanced source ports can allow to use it with other custom weapons.