DoomTools icon indicating copy to clipboard operation
DoomTools copied to clipboard

[DECOHack] "Safe" Freeing of States from a Starting Label

Open MTrop opened this issue 3 years ago • 2 comments

So, DECOHack's state freeing is a tad... overzealous, let's say.

There needs to be a way to safely free a state on a weapon or thing such that it doesn't "overfree" what is expected, despite it being the intended behavior.

A new clause keyword may be in order. Something like:

weapon WP_PISTOL only free Label

Or somesuch language to convey that it should only free that state until it hits a state that has a defined label. Will a reverse lookup need to be in order?

This may turn into a bit of a complicated issue, unfortunately, as the traverser only can see the next state via indexes, not labels. A quick scan may need to be in order at startup to set these up, if not baked into code, initially.

MTrop avatar Jul 23 '22 20:07 MTrop

A small bandage for the reason for this enhancement was added in commit aa3016f2064f06a08b3df264dc778a81fff4bf3d.

This kinda puts this issue in low priority, because the solution appears to be a lot more complicated than I think it is.

MTrop avatar Jul 27 '22 05:07 MTrop