Monsters stuck in doortracks, walls or hanging off lifts

Description
If a monster walks towards a door track pursuing a target, it may become stuck on the door track until the direction towards its target changes significantly.

If a monster is pushed onto a ledge by being attacked, or is standing on the threshold of a lift which begins to ascend, it may become trapped on the edge of the raised sector. The monster cannot normally turn, fire a weapon, or use projectile attacks in this situation (scratching/biting attacks, if any, are sometimes available). Lowering the lift a second time, or attacking the monster again so that it falls off the ledge entirely, releases it from its confined state.

If a projectile causes a monster to contact a wall at high velocity, it may become stuck in the wall. In the case of a Lost Soul, the projectile may be the monster itself.

Causes
The AI logic in Doom caused a monster to try to open a door or activate a lift if it was obstructed by any wall in the path towards its target (even a door track) and the sector belonging to the obstructing sidedef was a door or a lift. Thus if a player that the monster was targeting was in the direction of a door track, the monster would move towards the door track, and when blocked by it, try to open the door. Since the door was already open, this would not change anything, and the monster would get stuck as long as the player it was targeting was on the other side of the door track's plane than it was.

The logic also caused monsters to get stuck in 1-sided walls, or on lifts because of height differences. The reason is that the logic blocked any voluntary motion across a linedef if it was one-sided or if the height differences were too large. So if the monster was placed there involuntarily, by projectiles (sometimes by itself, in the case of Lost Souls), or by platform motion, it would be unable to free itself.

High-velocity motion, such as from attacking Lost Souls, or exploding rockets or barrels, often caused the calculated positions of objects to cross lines normally considered impassible, since the arithmetic used to calculate the objects' positions is inexact. If an object's calculated position crossed a wall's line by any amount, however small, the object could become stuck in the wall if the line was normally considered impassible.

Fix
Boom and its close derivatives (e.g. MBF) include fixes for these bugs, by making monsters know the difference between real door linedefs and door tracks, by allowing monsters to cross 2-sided lines which block motion solely due to height, if the motion preserves the monster's height (i.e. if the motion is towards an adjoining sector with the same height as the monster already has), and by allowing monsters to cross 1-sided lines if the motion is towards the side that the wall is facing.

Demo

 * [[Media:Map01 stuck.lmp|A trooper stuck on a lift]] ([[Image:Map01 stuck.lmp|file info]]) in MAP01: Entryway.