Page 1 of 1
Invulnerability blocks unmorph
Posted: Mon Sep 14, 2009 6:12 pm
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.
Re: Invulnerability blocks unmorph
Posted: Mon Sep 14, 2009 11:39 pm
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?

Re: Invulnerability blocks unmorph
Posted: Tue Sep 15, 2009 12:08 am
by Graf Zahl
Better don't post when you don't know what you are talking about!

Re: Invulnerability blocks unmorph
Posted: Tue Sep 15, 2009 8:56 am
by Project Shadowcat
Graf Zahl wrote:Better don't post when you don't know what you are talking about!

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.
Re: Invulnerability blocks unmorph
Posted: Tue Sep 15, 2009 8:59 am
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.
Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 1:27 pm
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).
Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 1:34 pm
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.
Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 1:35 pm
by MartinHowe
How exactly did you activate an invincibility powerup while you were morphed?
Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 1:38 pm
by Ichor
You were always able to use items while morphed. This went back to vanilla Heretic.
Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 1:53 pm
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!
Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 2:09 pm
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.
Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 2:43 pm
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.
Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 3:25 pm
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

Re: Invulnerability blocks unmorph
Posted: Thu Sep 17, 2009 3:35 pm
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

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?
Re: Invulnerability blocks unmorph
Posted: Fri Sep 18, 2009 1:26 am
by MartinHowe
Gez wrote:Is there any reason to prevent an invulnerable player from deliberately unmorphing?
None whatever, nor was that ever the intent.