Expose and virtualize AActor::AbsorbDamage

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Accensus
Posts: 2377
Joined: Thu Feb 11, 2016 9:59 am

Expose and virtualize AActor::AbsorbDamage

Post by Accensus »

Use case is allowing modders to reorder the calling of AbsorbDamage on items without overriding the entire DamageMobj virtual. I currently do this by building an ordered list of mod-specific items manually in the player's DamageMobj and calling Super.DamageMobj at the end with DMG_NO_ARMOR after they have reduced the damage. This has several major problems:

1) damage factors such as team and skill damage are not applied to items because doing so to the raw damage in the override would end up applying the factors twice upon calling Super.DamageMobj;
2) following 1), I could fix this by passing DMG_FORCED and handling everything on the player's end. This is anything but optimal and would add far too many moving parts that may potentially go out of date if anything is added to the internal DamageMobj.

Return to “Feature Suggestions [GZDoom]”