Pass all DamageMobj parameters to Inventory.ModifyDamage

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

Moderator: GZDoom Developers

argv
Posts: 184
Joined: Tue Aug 30, 2016 4:47 pm

Pass all DamageMobj parameters to Inventory.ModifyDamage

Post by argv »

“Inventory.ModifyDamage” is a powerful feature, but it's hampered by not having access to the information that “Actor.DamageMobj” has access to, namely inflictor, source, flags, and angle. Please consider adding some way to see these from ModifyDamage.

Perhaps it would be best to define a struct containing all DamageMobj parameters (inflictor, source, damage, damage type, flags, and angle), and pass that to both DamageMobj and ModifyDamage. This would greatly improve inventory items' ability to manipulate the damage that their owner receives (change the damage type, make the projectile bounce off instead of hitting, etc).
argv
Posts: 184
Joined: Tue Aug 30, 2016 4:47 pm

Re: Pass all DamageMobj parameters to Inventory.ModifyDamage

Post by argv »

I noticed that event handlers do see all of those parameters—but cannot change them.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Pass all DamageMobj parameters to Inventory.ModifyDamage

Post by Graf Zahl »

argv wrote:make the projectile bounce off instead of hitting, etc).

You cannot do that in ModifyDamage because the missile was already exploded.

Return to “Feature Suggestions [GZDoom]”