Resolve/FindState always succeed for XDeath in some cases

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Resolve/FindState always succeed for XDeath in some cases

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

by Graf Zahl » Sat Aug 03, 2019 1:49 pm

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

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

by Marisa the Magician » Sat Aug 03, 2019 3:32 am

So... XDeath resolves to Death.Extreme which, since I'm not using exact, falls back to Death?

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

by Graf Zahl » Fri Aug 02, 2019 11:23 pm

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.

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

by Matt » Fri Aug 02, 2019 2:10 pm

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)

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

by Graf Zahl » Fri Aug 02, 2019 12:11 pm

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.

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

by Nash » Fri Aug 02, 2019 4:04 am

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.

Resolve/FindState always succeed for XDeath in some cases

by Marisa the Magician » Fri Aug 02, 2019 1:34 am

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.

Top