Raised This Month: $ Target: $400
 0% 

TakeDamage event related question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-01-2013 , 21:13   TakeDamage event related question
Reply With Quote #1

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...
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 03-02-2013 , 10:28   Re: TakeDamage event related question
Reply With Quote #2

attacker == victim means the attacker did damage to himself (got damage from his own he grenade)
jimaway is offline
r0ck
Senior Member
Join Date: Jun 2011
Location: India
Old 03-02-2013 , 12:39   Re: TakeDamage event related question
Reply With Quote #3

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
__________________
Preparing to release my plugins..
r0ck is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-02-2013 , 13:31   Re: TakeDamage event related question
Reply With Quote #4

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
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-02-2013 at 13:34.
ConnorMcLeod is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-02-2013 , 14:23   Re: TakeDamage event related question
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
attacker == victim means the attacker did damage to himself (got damage from his own he grenade)
You don't say?

Quote:
Originally Posted by r0ck View Post
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
Quote:
Originally Posted by ConnorMcLeod View Post
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
I thought that... because, well, fall damage is done by a null entity, trigger_hurt is passed as inflictor and attacker, when selfkilling with kill command the Killed function is called directly, so that's why I was thinking "why this statement o.O" but "without having in care external plugins" just HE Grenade can validate this attacker == victim statement?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-02-2013 , 15:50   Re: TakeDamage event related question
Reply With Quote #6

Quote:
Originally Posted by meTaLiCroSS View Post
but "without having in care external plugins" just HE Grenade can validate this attacker == victim statement?
Yes, jimaway already wrote it.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-02-2013 , 20:38   Re: TakeDamage event related question
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
Yes, jimaway already wrote it.
Ok, thanks again n_n
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode