Closed bloxgate closed 9 years ago
Yeah looking at the pewpew code I can confirm this. Hang on while I deploy a fix
Can you test the GitHub version of this to make sure it works before I deploy to workshop? Thanks
Sadly the only place running the exact code that's problematic is a live server that has a lot of people on it right now so it may be a while.
I've talked to Matt about this and the logic was already correct. Something in your code must be wrong for that to happen.
Also note that pewpew calls util.BlastDamage alongside its BlastDamage function, in order to deal damage to players mainly. This could have an unwanted side effect if you have an addon that treats util.BlastDamage as damage that can destroy any prop. To prevent this, use both a PewPew_ShouldDoBlastDamage
and a EntityTakeDamage
hook at the same time. (http://wiki.garrysmod.com/page/GM/EntityTakeDamage)
I'll look into that now.
Looks like our EntityTakeDamage hook was missing a return false and some quirk in earlier versions of the script where I used the ShouldTakeBlastDamage hook was avoiding this somehow so when we changed to a better one this problem came up.
I'm running the following code in a hook:
However pewpew explosives are still doing normal damage and removing parts of people's contraptions AND calling the SC_ApplyDamage function at the same time. Looking through the code this should only be stopping the actual blast damage.