Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Analyzing & documenting bugs/quirks in Vanilla Heretic and Hexen

Recommended Posts

Looking to research and document (on Doom Wiki, etc.) bugs that are peculiar to vanilla Heretic and Hexen EXEs (not bugs in the maps/scripting).


- Bugs inherited from the early version of Doom that Heretic was based on, but that were fixed in later Doom releases so aren't always recognized as common vanilla bugs

- Bugs with things that are specific to Heretic and/or Hexen


A few I'm aware of:


- Monsters activating prematurely in Heretic.  This one drove me crazy for a long while as I initially thought monsters were hearing inappropriately so put all sorts of extra sound block lines and ambush flags, but eventually I found that switching to a nodebuilder that builds a proper REJECT table largely makes the issues go away, so I guess monsters can sometimes see through walls.  I have no idea how any of the line of sight stuff works, but have a vague recollection of reading that Doom sight code was improved in later releases so this is probably an "inherited from early versions of Doom" bug.  What exactly is going on here?

- Flying monsters stick together.  This seems to be something that the devs were aware of because there's a special exception in PIT_CheckThing in Heretic that disallows MT_IMP (Gargoyle) and MT_WIZARD (Disciple of D'Sparil) from moving over each other.  But they neglected MT_IMPLEADER (Fire Gargoyle) in those checks so the monster sticking can observably happen where they're involved.  In Hexen, there's a single exception for MT_BISHOP (Dark Bishops), I'm unsure if Afrits and Reivers have some alternate way they avoid getting stuck or if the sticking bug is possible there as well.  I don't recall ever seeing it happen with Afrits, but I'm less sure about Reivers.  It seems a lot less likely for their omission to be a mistake than the Fire Gargoyle instance though.  Maybe because they have that up-and-down motion while bishops don't?

- Explosion suicides can happen in Hexen under certain circumstances which require a fire-based enemy to destroy a decoration (tree, bush) that deals splash damage when it's burnt.  It's very likely that the bug exists in Heretic with exploding pods too, but this needs to be double checked.

- Hexen's Mystic Ambit Incant effects appear to shortchange the Mage and Fighter, as discussed here:


Others, or further info on these ones?

Share this post

Link to post
19 hours ago, ETTiNGRiNDER said:

I have no idea how any of the line of sight stuff works, but have a vague recollection of reading that Doom sight code was improved in later releases so this is probably an "inherited from early versions of Doom" bug.  What exactly is going on here?

Doom originally used a blockmap-based sight code, which suffered from some bug so they changed it to a BSP-based sight code, which didn't have that bug but was much slower. In Heretic and Hexen, they've kept the older version with the blockmap-based sight checks.


Note that ZDoom went back in 2003 to the blockmap-based check and fixed the bug. I believe this is this comment:


	// [RH] Fix for traces that pass only through blockmap corners. In that case,
	// xintercept and yintercept can both be set ahead of mapx and mapy, so the
	// for loop would never advance anywhere.



Edit: not fully fixed.

Edited by Gez

Share this post

Link to post

Not really Heretic-specific, but made more obvious by the fact that you can look up and down: You cannot shoot ceilings or floors with hitscan weapons. What happens instead is that the hitscan goes through the floor and hits a point in the wall below the floor, and then gets snapped back up to floor level.


Transparent sprites get cut by one pixel around the bottom of the screen in Heretic. This is a holdover from Doom's fuzz effect.


Using the wings of wrath over ice in Heretic sometimes allows you to fly at super speed, although sometimes I can't get it to work so I don't know under what circumstances this happens.


Getting hurt by lava sometimes temporarily stuns you. This is a result of them using the powered Phoenix rod as the damage type IIRC.


Heretic's -timedemo code was unchanged from Doom, meaning it did not read in the Look/fly values. This causes the player to flail about wildly, pause the game repeatedly, amomg other unwanted behavior.


Your feet will be clipped by water and your view will be slightly lower if you are standing off the edge of a ledge over water or lava. This is because the game checks what sector you are in versus what you are actually standing on. Pretty sure the reverse case is true too. This might also happen with ice but I haven't tried it myself.

Edited by Wagi

Share this post

Link to post
On 12/30/2019 at 8:07 AM, Wagi said:

Using the wings of wrath over ice in Heretic sometimes allows you to fly at super speed, although sometimes I can't get it to work so I don't know under what circumstances this happens.

Circumstances appear to be that the player has to have stood on top of a solid thing first.  I was reminded that there was a post at one point about that screwing up the player's friction for the rest of the level so decided to test it and that seems to be the prerequisite for the flying over ice speed boost, will have to look deeper into the code but I know from checking on the flags to figure out what they are (since HHE often mis-described them) that flight gives the player a flag which (among other things) alters friction so there's probably an interaction there somehow.


Edit1: So, the more technical explanation of the landing on object / flying over ice bugs:



The first phase is the player landing on top of a solid thing.  This triggers a section in P_MobjThinker that turns on the MF2_ONMOBJ flag.  Except... there's apparently no place that turns off the ONMOBJ flag once the player is in the air or on the floor or whatever, so its effects persist once that's happened.


So what does ONMOBJ do?  For one thing, it makes the checks in P_MovePlayer consider the player to be on the ground for purposes of walking/running.  So the first bug is that once you've landed on an object, you retain movement control in the air even if there's nothing you're standing on.


The second phase, where the ice is concerned, is in P_XYMovement:

		if(mo->flags2&MF2_FLY && !(mo->z <= mo->floorz)
			mo->momx = FixedMul(mo->momx, FRICTION_FLY);
			mo->momy = FixedMul(mo->momy, FRICTION_FLY);
		else if(special == 15) // Friction_Low
			mo->momx = FixedMul(mo->momx, FRICTION_LOW);
			mo->momy = FixedMul(mo->momy, FRICTION_LOW);
			mo->momx = FixedMul(mo->momx, FRICTION_NORMAL);
			mo->momy = FixedMul(mo->momy, FRICTION_NORMAL);

IOW, if the player's flying, but not on the floor, and not on an object, apply flight friction.  But since that "not on an object" check fails due to the flag never being cleared, it falls through to the ice special check; there's the second bug.  FRICTION_LOW is a bigger value than FRICTION_FLY (0xf900 vs 0xeb00).  FRICTION_NORMAL is a bit less than FRICTION_FLY (0xe800) so the full effect should actually be that after being on an object you fly a bit slower usually but faster over ice.

P_Thrust, on the other hand, does a different way of registering if the player's flying or not, which doesn't pay any attention to MF2_ONMOBJ, so it allows the player's running movement to be applied at full, rather than half speed the way it would normally be on ice, so rather than starting with slow movement and building up a "skating" momentum the way you normally would on ice, you start with your normal move speed and it increases from there.


Edit2: Hexen adds a condition that can unset MF2_ONMOBJ in P_MobjThinker so both of the associated bugs should be Heretic-specific.


Edit3: Looked into the lava stun thing.  It's kind of hard to tell if this is deliberate or not, since Heretic seems to go out of its way to use the MT_PHOENIXFX2 type as a "LavaInflictor" and phoenix flames do have a stun effect, but on the other hand in its place Hexen uses MT_CIRCLEFLAME (the cleric's firestorm flame rings) as the new LavaInflictor type, which don't appear to have any special effect.  Worth documenting either way.

Edited by ETTiNGRiNDER : Etc, stacking more stuff in as I look into it.

Share this post

Link to post

Just remembered another one: Heretic does not take scrolling floors into effect when merging visplanes. This effect is most obvious when lowering the waterfall elevator near the starting area of E2M5.


Also, I want to say that only Eastward scrollers work (maybe westward too but I don't have the source in front of me). The way they implemented scrolling floors was kind of hacky, so it might be the result of one of the devs saying "fuck it, I'm not implementing this".

Edited by Wagi

Share this post

Link to post

FWIW having barely glanced at these codebases -- the new wiki articles look great! Our bug material has been slanted toward Doom for forever.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now