Resolve/FindState always succeed for XDeath in some cases

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
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Resolve/FindState always succeed for XDeath in some cases

Post by Marisa the Magician »

For some reason, ResolveState and FindState (without exact = true) always succeed when checking for "XDeath" with any actor that's shootable or a missile, even if the actor does not have such a state (e.g.: BossBrain).

This sample mod will print to the console the result of various checks for XDeath being available on the actor. Running it on MAP30 makes it succeed for the boss brain, running it on E1M1 shows that the barrels also match up (even though they don't have XDeath). All player-shootable missiles do get matched too, even though none of them have XDeath defined.
User avatar
Nash
 
 
Posts: 17498
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Resolve/FindState always succeed for XDeath in some case

Post by Nash »

So I'm NOT going crazy! This was why Nashgore's gib check would sometimes weirdly spawn gibs even on actors that don't have an XDeath state.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49231
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Resolve/FindState always succeed for XDeath in some case

Post by Graf Zahl »

XDeath is just an alias for Death.Extreme so looking it up with exact=false will return the regular death state. This is by design.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Resolve/FindState always succeed for XDeath in some case

Post by Matt »

Would looking it up with exact=true be able to find both "xdeath" and "death.extreme" if the actor only has the other one explicitly defined?

(and I'm assuming this will be case insensitive)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49231
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Resolve/FindState always succeed for XDeath in some case

Post by Graf Zahl »

Both of these are the same internally. When the current damage type system got implemented the hard coded XDeath became a liability so all of its uses, both in definition and lookup get changed to Death.Extreme. The same happens with 'Ice' and 'Burn' and 'Disintegrate' states which also get renamed to their damage type aware equivalents.
User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Resolve/FindState always succeed for XDeath in some case

Post by Marisa the Magician »

So... XDeath resolves to Death.Extreme which, since I'm not using exact, falls back to Death?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49231
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Resolve/FindState always succeed for XDeath in some case

Post by Graf Zahl »

Yep. Which is precisely how death state lookup is supposed to work.
Post Reply

Return to “Closed Bugs [GZDoom]”