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.
GetModifiedDamage + ModifyDamage Expansion
Moderator: GZDoom Developers
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: GetModifiedDamage + ModifyDamage Expansion
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.
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.
Re: GetModifiedDamage + ModifyDamage Expansion
Both PR's here got merged, marking accordingly.