GetModifiedDamage + ModifyDamage Expansion

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

GetModifiedDamage + ModifyDamage Expansion

Post by Major Cooke »

Pull Request

DamageMobj now passes in the inflictor, source, and its flags (for RadiusDamageFactor checking via DMG_EXPLOSION) to powerups - and can also be passed in via the modder's side too.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: GetModifiedDamage + ModifyDamage Expansion

Post by Major Cooke »

Another small PR.

I overlooked the fact that PowerDamage didn't have any way to get the actual target being damaged because it passed in the original source, which is redundant. So I repurposed it to pass in the target in the internal DamageMobj function instead. This way the powerup can see whose being damaged.

However, if you think I should just pass in the target directly as an additional parameter, I can change it to do that. That would make things more clear, while the above is simplest. Which would be preferred? I'd hate to make it more confusing for others.
User avatar
Rachael
Posts: 13556
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: GetModifiedDamage + ModifyDamage Expansion

Post by Rachael »

Both PR's here got merged, marking accordingly.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”