[Fixed] Invulnerability blocks unmorph

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Invulnerability blocks unmorph

Postby Ichor » Mon Sep 14, 2009 7:12 pm

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
Ichor
The fun cannot be halted
 
Joined: 23 Jul 2003

Re: Invulnerability blocks unmorph

Postby Project Dark Fox » Tue Sep 15, 2009 12:39 am

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
Project Dark Fox
Married Furry Anxiety Bucket
 
Joined: 14 Jul 2005
Location: Louisville, KY USA
Twitch ID: ProjectDarkFox
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Invulnerability blocks unmorph

Postby Graf Zahl » Tue Sep 15, 2009 1:08 am

Better don't post when you don't know what you are talking about! :P
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Invulnerability blocks unmorph

Postby Project Dark Fox » Tue Sep 15, 2009 9:56 am

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
Project Dark Fox
Married Furry Anxiety Bucket
 
Joined: 14 Jul 2005
Location: Louisville, KY USA
Twitch ID: ProjectDarkFox
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Invulnerability blocks unmorph

Postby Ichor » Tue Sep 15, 2009 9:59 am

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
Ichor
The fun cannot be halted
 
Joined: 23 Jul 2003

Re: Invulnerability blocks unmorph

Postby Mr. Tee » Thu Sep 17, 2009 2:27 pm

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
Mr. Tee
Waiting for ZDoom Editing Demo 2.6.1? Wait longer! Life is very chaotic now.
 
Joined: 08 Feb 2004

Re: Invulnerability blocks unmorph

Postby Ichor » Thu Sep 17, 2009 2:34 pm

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
Ichor
The fun cannot be halted
 
Joined: 23 Jul 2003

Re: Invulnerability blocks unmorph

Postby MartinHowe » Thu Sep 17, 2009 2:35 pm

How exactly did you activate an invincibility powerup while you were morphed?
User avatar
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom

Re: Invulnerability blocks unmorph

Postby Ichor » Thu Sep 17, 2009 2:38 pm

You were always able to use items while morphed. This went back to vanilla Heretic.
User avatar
Ichor
The fun cannot be halted
 
Joined: 23 Jul 2003

Re: Invulnerability blocks unmorph

Postby MartinHowe » Thu Sep 17, 2009 2:53 pm

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
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom

Re: Invulnerability blocks unmorph

Postby Ichor » Thu Sep 17, 2009 3:09 pm

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.
User avatar
Ichor
The fun cannot be halted
 
Joined: 23 Jul 2003

Re: Invulnerability blocks unmorph

Postby Gez » Thu Sep 17, 2009 3:43 pm

I see this in P_UndoPlayerMorph:
Code: Select allExpand view
   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 4:35 pm, edited 1 time in total.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Invulnerability blocks unmorph

Postby MartinHowe » Thu Sep 17, 2009 4:25 pm

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
User avatar
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom

Re: Invulnerability blocks unmorph

Postby Gez » Thu Sep 17, 2009 4:35 pm

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?
Gez
 
 
 
Joined: 06 Jul 2007

Re: Invulnerability blocks unmorph

Postby MartinHowe » Fri Sep 18, 2009 2:26 am

Gez wrote:Is there any reason to prevent an invulnerable player from deliberately unmorphing?

None whatever, nor was that ever the intent.
User avatar
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest