View Single Post
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 03-05-2021 , 10:04   Re: [L4D & L4D2] Incapped Weapons Patch (1.11) [15-Feb-2021]
Reply With Quote #27

While incapped, all weapons behave as expected against infected. However, only the melee weapon does friendly-fire against other players, the primary weapon and pistols/magnum do not.

I suggest that melee weapons should not cause friendly-fire when incapped to match the behavior of pistols/magnum and primary weapon.

Update: I'm sure there are many ways to do this, but one way would be in your Event_Incapped function to hook SDKHook_OnTakeDamage (unhook as appropriate when player not incapped), then in OnTakeDamage function check for melee weapon (and victim/attacker are both valid and survivor) and return Plugin_Handled if true. Chances are you know a better way to do this...just trying to help if possible.
__________________

Last edited by Mystik Spiral; 03-05-2021 at 10:29.
Mystik Spiral is offline