[Added] GetModifiedDamage + ModifyDamage Expansion

Moderator: GZDoom Developers

GetModifiedDamage + ModifyDamage Expansion

Postby Major Cooke » Wed Feb 06, 2019 2:25 pm

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
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: GetModifiedDamage + ModifyDamage Expansion

Postby Major Cooke » Tue Feb 12, 2019 11:04 am

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
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: GetModifiedDamage + ModifyDamage Expansion

Postby Rachael » Sat Feb 16, 2019 11:39 am

Both PR's here got merged, marking accordingly.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest