Make sure global damage doesn't spawn impact effects#6842
Conversation
Goober5000
left a comment
There was a problem hiding this comment.
There is already a static bool global_damage variable, so you don't need the extra parameter.
|
Hmm. So using that was in fact my plan at a certain point, but Lafiel pointed out that it's a globally-defined variable that was doing non-obvious things and we weren't inclined to mess with it. On the other hand, I've just looked and I think I have a handle on what it's doing now, and if I used it I wouldn't have even have to pass in an extra bool, since it's global. So maybe I will use it. |
|
All right, made that change. |
|
Yeah, the static variable serves the same purpose as your parameter. |
Goober5000
left a comment
There was a problem hiding this comment.
Now that the extra parameter is no longer used, the ship_do_damage calls should not supply the default parameter values.
|
Done. |
* check whether damage is global * use static * remove extraneous arguments
#6785 mistakenly made it so that the application of global damage, such as the damage from a missile's area of effect, spawns an impact effect, leading to situations where a weapon might spawn two impact effects. Fixing it is a simple matter of passing in an extra bool.
Resolves #6841.