Invulnerability blocks unmorph
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.
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.
Invulnerability blocks unmorph
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.
If you try this in original Heretic or Hexen, you will unmorph while invulnerable in all cases.
- 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
The Chaos Device is supposed to send you to the beginning of the map in all cases, right? You know, to escape certain death?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Invulnerability blocks unmorph
Better don't post when you don't know what you are talking about!
- 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
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.Graf Zahl wrote:Better don't post when you don't know what you are talking about!
Re: Invulnerability blocks unmorph
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
What, pray tell, will block what? I don't think this sentence is very clear. From what I read, it either means: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.
- 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
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.
I don't know the exact version number (not at my home computer right now), but it's about a week old.
- MartinHowe
- Posts: 2022
- Joined: Mon Aug 11, 2003 1:50 pm
- Location: Waveney, United Kingdom
- Contact:
Re: Invulnerability blocks unmorph
How exactly did you activate an invincibility powerup while you were morphed?
Re: Invulnerability blocks unmorph
You were always able to use items while morphed. This went back to vanilla Heretic.
- MartinHowe
- Posts: 2022
- Joined: Mon Aug 11, 2003 1:50 pm
- Location: Waveney, United Kingdom
- Contact:
Re: Invulnerability blocks unmorph
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!
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
Perhaps a new flag for MorphStyle could work here, like MRF_CANUNDOWHILEINVULNERABLE or something.MartinHowe wrote:Let's hope one of the developers can do something about this - somebody help please!
Re: Invulnerability blocks unmorph
I see this in P_UndoPlayerMorph:
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.
Code: Select all
if ((pmo->flags2 & MF2_INVULNERABLE) &&
((player != activator) || (!(player->MorphStyle & MORPH_WHENINVULNERABLE))))
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.
- MartinHowe
- Posts: 2022
- Joined: Mon Aug 11, 2003 1:50 pm
- Location: Waveney, United Kingdom
- Contact:
Re: Invulnerability blocks unmorph
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.Gez wrote:In other words, instead of an "allow when invulnerable", there should have been a "disallow when invulnerable". A bit too late now.
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
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).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
In other words, MORPH_OLDEFFECTS is useless. Mmh.
Is there any reason to prevent an invulnerable player from deliberately unmorphing?
- MartinHowe
- Posts: 2022
- Joined: Mon Aug 11, 2003 1:50 pm
- Location: Waveney, United Kingdom
- Contact:
Re: Invulnerability blocks unmorph
None whatever, nor was that ever the intent.Gez wrote:Is there any reason to prevent an invulnerable player from deliberately unmorphing?