View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-18-2019 , 16:06   Re: Ham Damage (Knife)
Reply With Quote #17

get_user_weapon() checks the weapon that the player is holding at the moment when the damage is done. When you throw a HE grenade, it doesn't immediately explode, so the player is probably going to hold the knife again when it explodes and causes damage.

In order to prevent this, you need to check if iAttacker == iInflictor.
__________________

Last edited by OciXCrom; 09-18-2019 at 16:06.
OciXCrom is offline
Send a message via Skype™ to OciXCrom