Add commonly GZDoom-specific properties to DEHACKED #3062
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #3060 -- see linked issue for justification, but the gist is that folks making MBF21/DSDHacked mods find themselves needing to set a few GZDoom-specific fields for compatibility, but are forced to reimplement the entire actor in ZScript in order to achieve that. This sucks, naturally. :P
This PR adds the following properties to DEHACKED:
The obituary definitions were previously doable via LANGUAGE, but this makes it so modders don't have to dip into GZDoom-specific lumps at all to make things work nicely.
"Physical height" is just an alias for the Height field, but it's necessary in order to work around a fundamental difference in how the Height variable is treated across ports: in GZDoom, if you want to make a 56-unit-tall actor with an effective projectile collision height of 16, you'd set Height to 56 and ProjectilePassHeight to 16, but in other ports (e.g. dsda-doom and others that stick to vanilla), Height is effectively the projectille collision value -- i.e. a Height value of 56 will cause projectiles fired by the player on level ground to collide with it. Oopsie.
To fix this, with this PR you can set the following properties on a thing in DEHACKED:
Height 16
ProjectilePassHeight 16
PhysicalHeight 56
GZDoom will set Height to 56, while other ports will set Height to 16, making everything work consistently.
As an additional sanity check, trying to specify either ProjectilePassHeight or PhysicalHeight without also including the other will throw an error -- the patch must specify both, or neither.