[Since when?] Damagetype "DrainLife" does not ignore armor

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
Zhs2
Posts: 1301
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

[Since when?] Damagetype "DrainLife" does not ignore armor

Post by Zhs2 »

Tested with most recent revision [r1989] and 2.3.1, same results.

The damagetype "DrainLife", contrary to what it says [wiki=Damage_types]on the wiki[/wiki], does not ignore armor if you have it on. The Drowning damagetype works just fine, it seems, but that comes with its own obituary and I'm looking for something to use in a multipurpose wad.

To test, just load up the provided damageme.pk3, ]give all then ]puke 1. Instead of taking 50 health, it takes 25 and 25 blue armor...

Code:

Code: Select all

#include "zcommon.acs"

script 1 (void)
{
	Thing_Damage2(0,50,"DrainLife");
}
damageme.pk3
Not much else to say.
(604 Bytes) Downloaded 18 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by Graf Zahl »

The Wiki is wrong. Bypassing armor is not part of any damage type. This is more or less a missing feature of the Thing_Damage function than a bug.
User avatar
Zhs2
Posts: 1301
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by Zhs2 »

Hum. Like I said, if you put "Drowning" as the damagetype for the respective parameter, it doesn't subtract from a player's armor and takes only directly from the health when it does its damage calculations (a contradiction?) I was wondering why DrainLife doesn't do the same thing. :/
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by NeuralStunner »

I remember asking about armor and damage types before. I got the following info from Gez:
Gez wrote: Drowning: yes, armor (basic or Hexen) does not work for that damage type. This is checked at the armor level, so a powerup (or even an armor!) with a damage factor could still reduce it.
DrainLife: no, there are no checks for that damage type anywhere in the code, so it's treated as any normal damage type and absorbed by the armor normally.
Use a specific damage type for your piercing weapons/missiles/puffs, and give them the +PIERCEARMOR flag.
Last edited by NeuralStunner on Fri Nov 20, 2009 2:13 pm, edited 1 time in total.
User avatar
Zhs2
Posts: 1301
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by Zhs2 »

Damn. Hope it's not too late to ask for a new one.

[User Error]
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by NeuralStunner »

You posted while I was adding a bit more info. Check above. :wink:
User avatar
Zhs2
Posts: 1301
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by Zhs2 »

That's the problem. I want to use this in ACS, quite possibly with Thing_Damage2.
User avatar
Demolisher
Posts: 1749
Joined: Mon Aug 11, 2008 12:59 pm
Graphics Processor: nVidia with Vulkan support
Location: Winchester, VA
Contact:

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by Demolisher »

Code: Select all

#include "zcommon.acs"

script 1 (void)
{
   TakeInventory("Health", 50);
}
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by NeuralStunner »

Demolisher wrote:

Code: Select all

#include "zcommon.acs"

script 1 (void)
{
   TakeInventory("Health", 50);
}
This does not appear to work. Decorate's [wiki]A_TakeInventory[/wiki] does not work with Health either - It seems to be exempt from most inventory functions altogether. (AFAIK the Console is the only place to dynamically give/take health.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Since when?] Damagetype "DrainLife" does not ignore armor

Post by Graf Zahl »

I think the thread in Feature Suggestions covers this as well...
Post Reply

Return to “Closed Bugs [GZDoom]”