Thread: SM Damage
View Single Post
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 05-03-2009 , 09:10   Re: SM Damage
Reply With Quote #94

Quote:
Originally Posted by Vulkan View Post
I've modified the plug-in to work for the common infected mobs and the witch, as well as modified some of the workings to avoid some Left 4 Dead specific oddities: For example, when fighting the tank with the plug-in activated, and you did more damage to it from a single attack than what the tank had total, this line would be evoked:

SetEntityHealth(client,0);

However it would cause it to just sort of drop dead with no death animation, and the screen would continue shaking for some time after it died, I commented the line out which has the effect of disabling the extra damage whenever your damage is above what the victim's health is which fixes the problem but carries with it that you can't use extraordinarily high multipliers, otherwise it will have no effect on "player" type characters. (The common infected and witch don't apply to this, they'll take the extra walloping just fine if you decide for some reason you want to have a multiplier of 1,000)

The other change I've made is that it detects friendly fire, upon which the function ends and the teammate will only take regular damage, I suppose this could be made into a cvar option but I didn't really look into it.

These changes are very Left 4 Dead specific, so I suppose you can consider this version of the plug-in specific for Left 4 Dead use.

I'm nowhere near being a coder, and admittedly it's a pretty hacked up job so if someone with more experience can check it and see if it can be made to work better or more efficiently, it'd be much appreciated.
I looked at the code, everything looks fine.

Thank you mate. +Karma
I will add your modification in my first post.
__________________
SWAT_88 is offline