Small bug regarding artifacts in Heretic/Hexen

Tue Jan 05, 2021 11:50 pm

During deathmatch in vanilla Heretic and Hexen, the Ring of Invulnerability and Icon of the Defender do not respawn when picked up during play, in contrast to the other artifacts in the level.
However, in GZDOOM and it's derivatives, this is not the case. They will respawn with the other artifacts after a cooldown. Even when having sv_respawnsuper set to false, they will do so anyway.

I'm guessing the engine doesn't view them as super items?

Re: Small bug regarding artifacts in Heretic/Hexen

Thu Jan 07, 2021 1:25 am

It looks like these items don't have the INVENTORY.BIGPOWERUP flag.

Re: Small bug regarding artifacts in Heretic/Hexen

Thu Jan 07, 2021 4:31 am

Looking at Heretic's source code, at the very least, it appears that there is code preventing the Ring of Invincibility from respawning, but it's not in quite as obvious a place.

However, looking at Hexen's source code it appears to be a whole different story - I actually don't even know what to make of this. https://github.com/videogamepreservatio ... #L878-L901

It suggests that there are actually respawn "states" where it respawns said artifacts after a period of time as defined by their wait state.

How deep does this rabbit hole go? Well, I went and looked up the actual state the artifact goes in (in-world) when it is picked up. https://github.com/videogamepreservatio ... #L411-L431

What conclusion to draw from this? It comes back after 10 minutes, plus a short amount of animation time. Furthermore, the other artifacts as defined near the links I gave above, have different periods of respawn time, and if not specifically defined, do not respawn at all.

I kind of figured fixing this would not be as simple as adding flags. Some more evaluation and discussion is merited for how to handle this.

Re: Small bug regarding artifacts in Heretic/Hexen

Sat Jan 09, 2021 12:19 pm

So it's okay to add the INVENTORY.BIGPOWERUP flag to the ring of invincibility?

Re: Small bug regarding artifacts in Heretic/Hexen

Sat Jan 09, 2021 12:53 pm

Maybe, I haven't done that yet because I don't know how to handle Hexen's. The issue with Hexen's is no artifact respawns - except 4 specific ones and those are on a timer. And that's a big issue because it doesn't work that way in Heretic, and those artifacts share the same actor class.