by Major Cooke » Tue Feb 12, 2019 10: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.
[url=https://github.com/coelckers/gzdoom/pull/740]Another small PR.[/url]
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.