DOHARMSPECIES is either a misnomer or is bugged

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
Jekyll Grim Payne
 
 
Posts: 1076
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

DOHARMSPECIES is either a misnomer or is bugged

Post by Jekyll Grim Payne »

A bit of a headscratcher in terms of where to put it; I tested this on 4.7.1 and on 4.4.0, and the issue occurs in both versions, so this might be an oversight, rather than a bug?

Anyway, the issue: recently I was checking this for somebody and looking to update the wiki descriptions and it turns out DOHARMSPECIES is actually does the opposite of what it's implied to do. It allows monsters to be hurt by different monster classes belonging to the same speccies, but not to actually hurt them, unless they have that flag as well.

In other words, this should be something like VULNERABLETOSPECIES, not the other way around.

Code to reproduce (also attached):

Code: Select all

version "4.4.0"

class ZombiemanTest : Zombieman
{
	Default
	{
		species "Zombie";
		+DOHARMSPECIES
	}
	
	states
	{
	Missile:
		POSS E 10 A_FaceTarget;
		POSS F 8 A_SpawnProjectile("Plasmaball");
		POSS E 8;
		Goto See;
	}
}
	
class ShotgunGuyTest : ShotgunGuy
{
	Default
	{
		species "Zombie";
	}
	
	states
	{
	Missile:
		SPOS E 10 A_FaceTarget;
		SPOS F 8 A_SpawnProjectile("Plasmaball");
		SPOS E 8;
		Goto See;
	}
}
ZombiemanTest can be hurt by ShotgunguyTest but can't hurt ShotgunguyTest.
Attachments
DOHARMSPECIESbug.pk3
(337 Bytes) Downloaded 22 times
Last edited by Jekyll Grim Payne on Thu Jan 06, 2022 11:59 am, edited 1 time in total.
rayburn
Posts: 45
Joined: Sun Oct 14, 2018 6:30 pm

Re: DOHARMSPECIES is a misnomer

Post by rayburn »

Can confirm said behavior.
User avatar
Logan MTM
Posts: 678
Joined: Mon Jan 16, 2006 8:53 pm
Location: Rio de Janeiro - Brazil

Re: DOHARMSPECIES is a misnomer

Post by Logan MTM »

Interesting. I use that in my bastards dudes and it works fine. The only difference, i use old/gold Decorate.
User avatar
Jekyll Grim Payne
 
 
Posts: 1076
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: DOHARMSPECIES is a misnomer

Post by Jekyll Grim Payne »

Logan MTM wrote:Interesting. I use that in my bastards dudes and it works fine. The only difference, i use old/gold Decorate.
I've tested it in DECORATE first and it works exactly the same way. Since I don't know what code you're talking about, I'm not sure. But probably in your case both actors have DOHARMSPECIES, not just the shooter, which is what I'm talking about.
User avatar
Jekyll Grim Payne
 
 
Posts: 1076
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: DOHARMSPECIES is either a misnomer or is bugged

Post by Jekyll Grim Payne »

Update: I did some more extensive testing and finally updated the flags' descriptions on the wiki: https://zdoom.org/wiki/Actor_flags#Defenses

Short version goes like this:

Some prerequisites:
1. By default monsters of either the same class OR the same species can't deal impact projectile damage to each other.
2. By default all monsters will deah explosive projectile damage to each other and themselves, regardless of class or species.

The 3 flags in question change the above behavior in the following ways:
  • DOHARMSPECIES: allows the monster to RECEIVE impact damage from projectiles fired by monsters belonging to the same species, regardless of the flags on those monsters. (Explosive damage is applied to everyone as usual.)
  • DONTHARMCLASS: prevents the monster from DEALING explosive damage by projectiles to monsters of the same class (impact damage is also not dealt, as usual).
  • DONTHARMSPECIES: prevents the monster from DEALING explosive damage by projectiles to monsters of the same species (impact damage is also not dealt, as usual). Implies DONTHARMCLASS.
Post Reply

Return to “Closed Bugs [GZDoom]”