by Accensus » Fri Oct 14, 2022 6:48 pm
Following the train of thought
here, the idea behind DMG_TEST (or DMG_NODAMAGE, whatever works) is to call Super.DamageMobj to get the final damage without doing any real health reduction. This way I can operate on the value after it's been modified by factors and whatnot, and use it in calculations separately from the damage argument, which is the raw value and often times useless to work with in my case. I can't assign the return of Super.DamageMobj to a variable and work with that because by that point it's already too late and the damage has already been dealt.
Following the train of thought [url=https://forum.zdoom.org/viewtopic.php?t=76584]here[/url], the idea behind DMG_TEST (or DMG_NODAMAGE, whatever works) is to call Super.DamageMobj to get the final damage without doing any real health reduction. This way I can operate on the value after it's been modified by factors and whatnot, and use it in calculations separately from the damage argument, which is the raw value and often times useless to work with in my case. I can't assign the return of Super.DamageMobj to a variable and work with that because by that point it's already too late and the damage has already been dealt.