[Closed] 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.

DOHARMSPECIES is either a misnomer or is bugged

Postby Jekyll Grim Payne » Wed Jan 05, 2022 7:52 am

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 allExpand view
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.
You do not have the required permissions to view the files attached to this post.
Last edited by Jekyll Grim Payne on Thu Jan 06, 2022 11:59 am, edited 1 time in total.
User avatar
Jekyll Grim Payne
 
 
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: DOHARMSPECIES is a misnomer

Postby rayburn » Wed Jan 05, 2022 7:57 am

Can confirm said behavior.
rayburn
 
Joined: 14 Oct 2018

Re: DOHARMSPECIES is a misnomer

Postby Logan MTM » Wed Jan 05, 2022 8:18 am

Interesting. I use that in my bastards dudes and it works fine. The only difference, i use old/gold Decorate.
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: DOHARMSPECIES is a misnomer

Postby Jekyll Grim Payne » Wed Jan 05, 2022 8:54 am

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
 
 
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: DOHARMSPECIES is either a misnomer or is bugged

Postby Jekyll Grim Payne » Tue Mar 29, 2022 8:52 am

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.
User avatar
Jekyll Grim Payne
 
 
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests