Invulnerability blocks unmorph

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Invulnerability blocks unmorph

Post by Ichor »

If you turn yourself into a chicken in Heretic or a pig in Hexen, then use an invincibility powerup before you change back, if you're still invulnerable by the time the morph wears off, it will block it. You would be stuck that way permanently, even if you exit the map. Also, if while you're a chicken, you use the invincibility, then use the tome of power, you die. If you try it in Hexen with the chaos device, it neither unmorphs you nor kills you, but sends you to the start of the map.

If you try this in original Heretic or Hexen, you will unmorph while invulnerable in all cases.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Invulnerability blocks unmorph

Post by Project Shadowcat »

The Chaos Device is supposed to send you to the beginning of the map in all cases, right? You know, to escape certain death? :?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Invulnerability blocks unmorph

Post by Graf Zahl »

Better don't post when you don't know what you are talking about! :P
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Invulnerability blocks unmorph

Post by Project Shadowcat »

Graf Zahl wrote:Better don't post when you don't know what you are talking about! :P
Does Hexen treat this Device a little differently, or are you talking to him? At least I can say I posted that not 100% certain.
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: Invulnerability blocks unmorph

Post by Ichor »

In Hexen (while invulnerable), it unmorphs you along with sending you back to the start of the map. Using ZDoom, it just sends you back, but still as a pig.
User avatar
Mr. Tee
Posts: 1111
Joined: Sun Feb 08, 2004 7:49 pm
Contact:

Re: Invulnerability blocks unmorph

Post by Mr. Tee »

Ichor wrote:If you turn yourself into a chicken in Heretic or a pig in Hexen, then use an invincibility powerup before you change back, if you're still invulnerable by the time the morph wears off, it will block it.
What, pray tell, will block what? I don't think this sentence is very clear. From what I read, it either means:

- When you are morphed, and use an invincibility power up, you remain invincible even after your morph has worn off
- When you are morphed, and use an invincibility power up, your invincibility will wear off at the same time as your morph does

Either way, I have no idea which is the intended behaviour (also, which version of ZDoom are you using?? This might already have been fixed in the latest SVN build, but we don't know which version you are using).
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: Invulnerability blocks unmorph

Post by Ichor »

Oh, heh. I mean if you're invulnerable when it's time for you to unmorph, you will fail to unmorph and remain as a chicken permanently.

I don't know the exact version number (not at my home computer right now), but it's about a week old.
User avatar
MartinHowe
Posts: 2022
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom
Contact:

Re: Invulnerability blocks unmorph

Post by MartinHowe »

How exactly did you activate an invincibility powerup while you were morphed?
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: Invulnerability blocks unmorph

Post by Ichor »

You were always able to use items while morphed. This went back to vanilla Heretic.
User avatar
MartinHowe
Posts: 2022
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom
Contact:

Re: Invulnerability blocks unmorph

Post by MartinHowe »

Sod it. Fark it. Dammit. Manchester United win the League. And other vile and nasty curses.

Bit of history - a year and a half ago (though it feels like a hundred) I made a lot of improvements to the ZDoom morphing subsystem because as a DECORATE developer, was well and truly pissed off at the arbitrary behaviours and hardcoded special effects.

While these enhancements were mostly well-recieved after Graf had added them into the engine, there were still loopholes and things I wanted to do better, especially things like specifying the things the player is allowed to do or pickup, etc. In particular, you have just found one of them :( While invulnerable, the player is supposed to be immune to being unmorphed but, if they were made invulnerable while being morphed, that should not stop an otherwise legal unmorph.

Unfortunately, some nasty RL shit took over my life and left me no time to further develop it and, sadly, nor did anybody else take up the baton. Although how the hell a chicken is supposed to take a ring out of a bag being dragged behind its tiny body and put that ring on is beyond me, this was original behaviour, so I guess it should be considered a bug that you can't.

Let's hope one of the developers can do something about this - somebody help please!
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: Invulnerability blocks unmorph

Post by Ichor »

MartinHowe wrote:Let's hope one of the developers can do something about this - somebody help please!
Perhaps a new flag for MorphStyle could work here, like MRF_CANUNDOWHILEINVULNERABLE or something.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Invulnerability blocks unmorph

Post by Gez »

I see this in P_UndoPlayerMorph:

Code: Select all

	if ((pmo->flags2 & MF2_INVULNERABLE) && 
		((player != activator) || (!(player->MorphStyle & MORPH_WHENINVULNERABLE))))
This means that a deliberate activation (player == activator) will fail unless the morphstyle flag is on. Here's a hacky solution which considers that a perfectly standard morph style always allow deliberate activation.

A new flag sure could be added, but by design the standard morph behavior (when all morph flags are false) should be the one replicating the chicken/pig morphs faithfully. In other words, instead of an "allow when invulnerable", there should have been a "disallow when invulnerable". A bit too late now.

Whelp, doesn't work.
Last edited by Gez on Thu Sep 17, 2009 3:35 pm, edited 1 time in total.
User avatar
MartinHowe
Posts: 2022
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom
Contact:

Re: Invulnerability blocks unmorph

Post by MartinHowe »

Gez wrote:In other words, instead of an "allow when invulnerable", there should have been a "disallow when invulnerable". A bit too late now.
Actually, IIRC morphing and unmorphing being disallowed while invulnerable was the default, hence the positive style flag. My real mistake, IMO, was not treating morphing and unmorphing separately; I defined only one "when invulnerable" style flag for both morphing and unmorphing; there should have really been two ...WHILEINVULNERABLE flags - one for morphing and one for unmorphing. Or there could have been a check for invulnerability invoked while morphed. Or both.

Anyway, Gez' idea -just looked at that patch - seems fine to me; I knew defining a MORPH_OLDEFFECTS value (that's just zero) would be useful some day :P
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Invulnerability blocks unmorph

Post by Gez »

MartinHowe wrote:Anyway, Gez' idea -just looked at that patch - seems fine to me; I knew defining a MORPH_OLDEFFECTS value (that's just zero) would be useful some day :P
Actually, it doesn't work. Because contrarily to what the comments say for MORPH_OLDEFFECTS, the chicken morph has MORPH_UNDOBYTOMEOFPOWER (so it's not 0) and the pig morph has MRF_UNDOBYTOMEOFPOWER|MRF_UNDOBYCHAOSDEVICE (so it's even less 0).

In other words, MORPH_OLDEFFECTS is useless. Mmh.


Is there any reason to prevent an invulnerable player from deliberately unmorphing?
User avatar
MartinHowe
Posts: 2022
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom
Contact:

Re: Invulnerability blocks unmorph

Post by MartinHowe »

Gez wrote:Is there any reason to prevent an invulnerable player from deliberately unmorphing?
None whatever, nor was that ever the intent.
Post Reply

Return to “Closed Bugs [GZDoom]”