Lately I have been editing an add-on map for Id Software's classic game 'Doom' in Deth. I may be the last masochist using RISC OS both for creating and testing Doom maps, but I thought it worth writing up my findings for posterity here.
After a few hours spent reading about how sound is supposed to propagate from sector to sector, I concluded that there is a bug in the Acorn port of 'Doom' published by R-Comp Interactive. I confirmed this by testing the behavior of two other versions of Doom on Windows: 'Chocolate Doom' (a bug-compatible source port; see
http://www.chocolate-doom.org/) and 'Doomsday' (a state-of-the art source port; see
http://www.dengine.net/)
The bug is that sound does not cross some two-sided linedefs where the sectors on either side have compatible floor and ceiling heights. This means enemies on the other side of such linedefs are not alerted to the player's presence as they should be if he discharges a weapon in a connected sector that is not separated from the sector containing the monster by at least two linedefs with the 'block sound' flag set (on every possible path between the two sectors).
This changes the game significantly, because it allows the player to ambush monsters that have been behaving as though they were deaf, although they were not intended to be deaf by the map designer. Overall, I would expect it to make the game easier, but it might make some maps impossible! A contrived example is a scenario where the player must pass through a door that he cannot open from the outside, but can be opened from the inside by a monster. A monster on the inside will not try to open the door unless alerted to the player's presence. This may never happen because of the bug.
The minimal test case is three sectors; the first connected to the second, and the second connected to the third (the first and third sectors are unconnected). The linedef connecting the first and second sectors has the 'blocks sounds' flag set. In Acorn Doom, a monster in the third sector cannot hear the player in the first sector; in every other version, the monster is alerted. This is wrong because TWO linedefs with the 'block sound' flag set should be required to block sound. Acorn Doom behaves as though the linedef connecting the second and third sectors also has its 'block sound' flag set, but it does not.
I suspect this is a failed optimization. At first I thought that the Acorn port might pre-compute a table of which sectors are audible from other sectors upon loading a map (which would be a flawed implementation, given that doors can be opened). However, it turns out that no doors are required for the bug to manifest; it just happens that doors are the commonest cause of an extra linedef between a monster that wrongly acts deaf and a linedef with its 'blocks sound' flag set. The simplest example is a door with one of its two-sided linedefs set to block sound. (This is sensible, whereas a door with both two-sided linedefs set to block sound would be stupid because it would prevent monsters on the far side from hearing the player even whilst the door is open.)