-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for entity final damage callbacks #578
Conversation
Northstar.CustomServers/mod/scripts/vscripts/_codecallbacks_common.gnut
Outdated
Show resolved
Hide resolved
Co-authored-by: uniboi <64006268+uniboi@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, worked in testing, adding as well as removing callbacks,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested by adding and removing FinalDamageCallbacks to an entity and killing it in game.
Works in testing and the code looks good as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not test / code review PR, simply giving sign-off approval based on other reviews.
Adds FinalDamageCallbacks to entities.
Final damage callbacks exist for classes and are only used for multiplicative changes to damage to avoid issues where a later damage callback adds/subtracts a flat amount. This is why, for instance, Sword Block uses a final damage callback, as otherwise Railgun's charge damage ignores the damage reduction (as the Railgun callback is added after). Entities don't have these callbacks currently.
Primarily adding this to support better Frontier War harvester damage callback code, but usable elsewhere.