Raised This Month: $51 Target: $400
 12% 

OnTakeDamage, TraceAttack, player_hurt


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 10-17-2015 , 01:37   OnTakeDamage, TraceAttack, player_hurt
Reply With Quote #1

3 of their damage values are different each others.

is this bug of SDKHooks? it's something like they(except player_hurt)'re the values which are not yet considered armor and distance or something.
__________________
Starbish is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-17-2015 , 14:55   Re: OnTakeDamage, TraceAttack, player_hurt
Reply With Quote #2

As you guessed, OnTakeDamage is before armor (CS:S/CS:GO) or critical hits (TF2).

There is a variation named OnTakeDamageAlive that is fired after those are taken into account.

Not sure what TraceAttack uses.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 10-17-2015 at 14:56.
Powerlord is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-17-2015 , 15:19   Re: OnTakeDamage, TraceAttack, player_hurt
Reply With Quote #3

Quote:
Originally Posted by Powerlord View Post
As you guessed, OnTakeDamage is before armor (CS:S/CS:GO) or critical hits (TF2).

There is a variation named OnTakeDamageAlive that is fired after those are taken into account.

Not sure what TraceAttack uses.
For most games, I believe TraceAttack will be the same as OnTakeDamage - for the few that use them, TraceAttack is (again, I believe) before Hitgroup multipliers are taken into account.

The order of "correctness" is TraceAttack -> OnTakeDamage -> OnTakeDamage_Alive -> player_hurt.
__________________

Last edited by asherkin; 10-17-2015 at 15:20.
asherkin is offline
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 10-17-2015 , 16:16   Re: OnTakeDamage, TraceAttack, player_hurt
Reply With Quote #4

Quote:
Originally Posted by asherkin View Post
For most games, I believe TraceAttack will be the same as OnTakeDamage - for the few that use them, TraceAttack is (again, I believe) before Hitgroup multipliers are taken into account.

The order of "correctness" is TraceAttack -> OnTakeDamage -> OnTakeDamage_Alive -> player_hurt.
Yes. i tested and you're right. thank you.
__________________
Starbish 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 04:32.


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