Raised This Month: $32 Target: $400
 8% 

Detecting when hitting a shield


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Warthog
Junior Member
Join Date: Feb 2007
Old 02-13-2007 , 02:04   Detecting when hitting a shield
Reply With Quote #1

After playing around with VEN's code for http://forums.alliedmods.net/showthread.php?t=49395 , I discovered that there is a hitgroup not covered in the #define's in amxconst.inc

If you hit a shield, get_tr2(ptr, TR_iHitgroup) returns hitgroup 8, so maybe this could be added to amxconst.inc as #define HIT_SHIELD 8

get_user_attacker() will never return this value, because if you hit a person with a shield then obviously no damage occurs and no Damage event takes place.

I have absolutely no clue when someone would ever need to detect when someone hits a shield , but for future reference it is hitgroup 8.
Warthog is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-13-2007 , 02:28   Re: Detecting when hitting a shield
Reply With Quote #2

Nice work! This could lead to a few clever plugins.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 02-14-2007 , 20:55   Re: Detecting when hitting a shield
Reply With Quote #3

Omg we had somebody join this month, and there actually intelligent! You've restored my faith in humanity :-).
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-20-2007 , 21:47   Re: Detecting when hitting a shield
Reply With Quote #4

Holy crap, what is humanity?
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Zenith77
Veteran Member
Join Date: Aug 2005
Old 02-20-2007 , 21:52   Re: Detecting when hitting a shield
Reply With Quote #5

Some two legged creatures. Very weird.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 06:05.


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