Difference between revisions of "Sleeping shotgun guy in MAP02 (Doom II)"

From DoomWiki.org

[unchecked revision][unchecked revision]
(Who wrote this nonsense? Give a better explanation)
(punc; wiki; + demo file; factual error in 1st paragraph as to which sergeant it is; + same problem on E1M5 (bet you didn't know that! :>; mentioned coordinates in "technical" section)
Line 1: Line 1:
In MAP02 of Doom II, after opening the pillar to the left of the starting point and past the doors requiring the [[items#Other|blue key]] (Co-ordinates: 946,903,-16), there is a [[sergeant|shotgun guy]] next to a [[barrel]]. However, he ignores the player and does not "wake up" as monsters usually do when spotting a player.
+
In [[MAP02: Underhalls (Doom II)|MAP02]] of [[Doom II]], after going through the first door, the player must get past a [[sergeant]] in order to press the switch that opens the next part of the level. However, this sergeant ignores the player and does not "wake up" as monsters usually do when spotting a player.
  
Usually, the bug is not noticed, as the player must confront two [[trooper]]s before reaching the sergeant.  The action of killing them usually wakes up the sergeant (who is still sensitive to sound).
+
Usually, the bug is not noticed, as the player must confront two [[trooper]]s in the same room before reaching the sergeant.  The action of killing them usually wakes up the sergeant (who is still sensitive to sound).
 +
 
 +
The same error can occur, in reverse, on [[E1M5: Phobos Lab (Doom)|E1M5]] of [[Doom]]. If the player walks slowly up the left side of the first staircase, he may awaken the [[Imp]] in the far northeast corner of the room directly in front of him, even though there is a solid wall between the two locations.
  
 
== Technical ==
 
== Technical ==
  
 
The behavior occurs due to a bug in Doom's line of sight code. The code which causes it is located in [[Doom source code:files|p_sight.c]], in the function P_DivlineSide.
 
The behavior occurs due to a bug in Doom's line of sight code. The code which causes it is located in [[Doom source code:files|p_sight.c]], in the function P_DivlineSide.
 +
 +
The bug can be triggered only on levels where the ''x'' coordinate of a [[monster]] is the same as the ''y'' coordinate of a [[vertex]] at one end of a horizontal [[linedef]].  In the MAP02 case, the sergeant is at (1200,1232) and one of the vertices behind him is at (1232,1200).  In the E1M5 case, the Imp is at (672,1264) and one of the linedefs south of it has a vertex at (400,672).
 +
 +
== Demo files ==
 +
 +
* [[Media:D202blnd.lmp|The sleeping sergeant]] ([[:Image:D202blnd.lmp|file info]]) on [[MAP02: Underhalls]]
  
 
== External links ==
 
== External links ==
  
* [http://games.moria.org.uk/doom/research/MAP02-sleepwalker The Sleepingwalking Sergeant of MAP02]], a technical explanation by Colin Phipps.
+
* [http://games.moria.org.uk/doom/research/MAP02-sleepwalker The Sleepingwalking Sergeant of MAP02], a technical explanation by [[Colin "cph" Phipps]].
  
 
[[Category:Errors and bugs]]
 
[[Category:Errors and bugs]]

Revision as of 15:31, 14 March 2006

In MAP02 of Doom II, after going through the first door, the player must get past a sergeant in order to press the switch that opens the next part of the level. However, this sergeant ignores the player and does not "wake up" as monsters usually do when spotting a player.

Usually, the bug is not noticed, as the player must confront two troopers in the same room before reaching the sergeant. The action of killing them usually wakes up the sergeant (who is still sensitive to sound).

The same error can occur, in reverse, on E1M5 of Doom. If the player walks slowly up the left side of the first staircase, he may awaken the Imp in the far northeast corner of the room directly in front of him, even though there is a solid wall between the two locations.

Technical

The behavior occurs due to a bug in Doom's line of sight code. The code which causes it is located in p_sight.c, in the function P_DivlineSide.

The bug can be triggered only on levels where the x coordinate of a monster is the same as the y coordinate of a vertex at one end of a horizontal linedef. In the MAP02 case, the sergeant is at (1200,1232) and one of the vertices behind him is at (1232,1200). In the E1M5 case, the Imp is at (672,1264) and one of the linedefs south of it has a vertex at (400,672).

Demo files

External links