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.
Resolve/FindState always succeed for XDeath in some cases
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.
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.
- 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
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.
- Graf Zahl
- 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
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.
- 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
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)
(and I'm assuming this will be case insensitive)
- Graf Zahl
- 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
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.
- 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
So... XDeath resolves to Death.Extreme which, since I'm not using exact, falls back to Death?
- Graf Zahl
- 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
Yep. Which is precisely how death state lookup is supposed to work.