TakeDamage event related question
When does the attacker == victim? Just was reading a public plugin and I saw this condition, and I didn't think when this happens also with a he-grenade...
|
Re: TakeDamage event related question
attacker == victim means the attacker did damage to himself (got damage from his own he grenade)
|
Re: TakeDamage event related question
I have tested in my plugin way back i also wondered the same but it works for He-Grenade ("ONLY" not sure)
but i have seen attacker==victim in many plugins in traceattack, though there is no effect of attacker == victim in traceattack..., It just in case of takedamage & he grenade damage it is usefull |
Re: TakeDamage event related question
Anyway, even if it is useless, it is a small check that doesn't use cpu so it is completely safe to use.
Also, you may consider that some plugins may send Ham_TraceAttack or TakeDamage with attacker == victim using ExecuteHamB, example (could use HamB) : mirror damage : https://forums.alliedmods.net/showpo...09&postcount=2 |
Re: TakeDamage event related question
Quote:
Quote:
Quote:
|
Re: TakeDamage event related question
Quote:
|
Re: TakeDamage event related question
Quote:
|
| All times are GMT -4. The time now is 21:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.