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

TF2DECAP: Heads will roll! (Decapitation plugin)


Post New Thread Reply   
 
Thread Tools Display Modes
eee
Member
Join Date: Aug 2009
Old 12-31-2009 , 18:18   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #11

Quote:
Originally Posted by Antithasys View Post
Since you reported and asked the questions I will respond.

You did everything just fine. I will be leaving this plugin in New Plugins for a bit to have others test it and report on it.
Awesome, thank you very much.

Quote:
Originally Posted by Jindo View Post
If headshot is customkill 1, why not check that in the damagebits property of the player_death event, and apply the decapitated ragdoll if it matches?
Um, that's kind of what I did, I checked the customkill on player_death. I just meant there aren't hitbox locations passed on the player_death event, only on player_hurt. I could, as I said, prehook player_hurt, I just was under the impression that it would be too much stress on a server doing that so often, especially with tf2 often being resource-heavy. If I'm wrong I can totally change my method to a player_hurt prehook.
I'm also a little confused on what you mean by 'damagebits'. I'm not entirely familiar with the damagebits event int, does it change for every weapon if you hit them in a different hitgroup? If so, even better, I'd love to add that in! I can't seem to find anything explanatory except the definition from modevents ("damagebits" "long" // bits of type of damage).

(please note that if that's how it works, I have no problem with testing every weapon's headshot damagebits when I return, if it hasn't been done already)


Quote:
Originally Posted by noodleboy347 View Post
I can confirm that this works great.
Hey, awesome! I'm glad it's working.


I'm going to be away for the new year's holiday, and if there are any more questions I will be glad to answer them when I return.
eee is offline
Jindo
AlliedModders Donor
Join Date: May 2009
Location: England, UK
Old 12-31-2009 , 20:02   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #12

Quote:
Originally Posted by eee View Post
Um, that's kind of what I did, I checked the customkill on player_death. I just meant there aren't hitbox locations passed on the player_death event, only on player_hurt. I could, as I said, prehook player_hurt, I just was under the impression that it would be too much stress on a server doing that so often, especially with tf2 often being resource-heavy. If I'm wrong I can totally change my method to a player_hurt prehook.
I'm just unsure why you'd need to hook player_hurt at all when the ragdolls are applied after a player is killed, you can check headshots with customkill in the player_death event so surely you wouldn't need the hitboxes.

Quote:
I'm also a little confused on what you mean by 'damagebits'. I'm not entirely familiar with the damagebits event int, does it change for every weapon if you hit them in a different hitgroup? If so, even better, I'd love to add that in! I can't seem to find anything explanatory except the definition from modevents ("damagebits" "long" // bits of type of damage).
I confused myself there, disregard that. The damagebits are used for detecting things such as fake deaths and dominations, I meant to refer to checking the customkill to see if it matches.
__________________
Jindo is offline
eee
Member
Join Date: Aug 2009
Old 01-01-2010 , 17:15   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #13

Quote:
Originally Posted by Jindo View Post
I'm just unsure why you'd need to hook player_hurt at all when the ragdolls are applied after a player is killed, you can check headshots with customkill in the player_death event so surely you wouldn't need the hitboxes.


I confused myself there, disregard that. The damagebits are used for detecting things such as fake deaths and dominations, I meant to refer to checking the customkill to see if it matches.

Aaaa, I think we're both confused.
Customkill 1 only happens on certain weapon headshots (Ambassador, Huntsman, Sniper Rifle), the ones with a predisposition to cause a critical hit and a damage icon/condition on a headshot. Therefore shooting someone in the head with anything else wouldn't cause a customkill of 1. That's why I'd have to check hitboxes on player_hurt if it were to cause decapitation on any weapon headshot, and that would be rendered very inaccurate with shotguns, but still possible.
(It would be rendered inaccurate with other weapons as well, but those aren't hitscan and I can check for that.)

Of course, as I said, prehooking player_hurt was a concern of mine, which is why I already had it doing as you said, checking customkill 1 on the player_death prehook.
I hope we're on the same page now, and I hope you all had a great New Years!
eee is offline
Jindo
AlliedModders Donor
Join Date: May 2009
Location: England, UK
Old 01-01-2010 , 21:28   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #14

Quote:
Originally Posted by eee View Post
Aaaa, I think we're both confused.
Customkill 1 only happens on certain weapon headshots (Ambassador, Huntsman, Sniper Rifle), the ones with a predisposition to cause a critical hit and a damage icon/condition on a headshot. Therefore shooting someone in the head with anything else wouldn't cause a customkill of 1. That's why I'd have to check hitboxes on player_hurt if it were to cause decapitation on any weapon headshot, and that would be rendered very inaccurate with shotguns, but still possible.
(It would be rendered inaccurate with other weapons as well, but those aren't hitscan and I can check for that.)
I see now, so you're trying to have it decapitate when any weapon kills with a headshot, and not just the weapons that are intended to get headshots. I'll see what I can find on the hitboxes; although last time I checked, the player_pinned event (for example) showed me that different classes had different IDs for the same body parts (so a medic's lower left leg could be 14 while a scout's lower left leg may be 23), if there's a way of detecting headshots using the hitboxes it could be messy and impractical.
__________________
Jindo is offline
eee
Member
Join Date: Aug 2009
Old 01-01-2010 , 22:00   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #15

Quote:
Originally Posted by Jindo View Post
I see now, so you're trying to have it decapitate when any weapon kills with a headshot, and not just the weapons that are intended to get headshots. I'll see what I can find on the hitboxes; although last time I checked, the player_pinned event (for example) showed me that different classes had different IDs for the same body parts (so a medic's lower left leg could be 14 while a scout's lower left leg may be 23), if there's a way of detecting headshots using the hitboxes it could be messy and impractical.
Thank you. I already know I can make it decapitate on any weapon's headshot if I use a complicated prehook player_hurt and then check if it would kill them, which is (as you said) pretty messy, but unless I'm mistaken, prehooking player_hurt is a no-no (especially when messing with entities) and slows down servers (especially tf2 servers). The plugin works (so far), I'm just always looking for ways to improve, and if i could somehow get a hitbox location in player_death that'd be grand, but I can't.

Thank you for your help, I hope you find something, I'm certainly looking!
__________________
eee is offline
Jindo
AlliedModders Donor
Join Date: May 2009
Location: England, UK
Old 01-02-2010 , 05:03   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #16

Well I may have found something, the only issue is that it involves the use of an extension, if that's not a problem for you then here goes:

SDKHooks has a TraceAttack hook which can get the hitbox and hitgroup of the victim, I'll look in to this a little later and see if I can make any use of it.
__________________
Jindo is offline
rig0r
Member
Join Date: Dec 2009
Old 01-02-2010 , 07:26   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #17

Thank you for this plugin. Works fine, altough the spy seems to drop two hats (and a head ) when you headshot him. Not sure if that is caused by this plugin though.
__________________
rig0r is offline
eee
Member
Join Date: Aug 2009
Old 01-02-2010 , 10:24   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #18

Quote:
Originally Posted by Jindo View Post
Well I may have found something, the only issue is that it involves the use of an extension, if that's not a problem for you then here goes:

SDKHooks has a TraceAttack hook which can get the hitbox and hitgroup of the victim, I'll look in to this a little later and see if I can make any use of it.
Cool, thank you. I hope it's less resource-hungry than player_hurt, if so I'd be more than glad to implement it.

Quote:
Originally Posted by rig0r View Post
Thank you for this plugin. Works fine, altough the spy seems to drop two hats (and a head ) when you headshot him. Not sure if that is caused by this plugin though.
Is this only occurring with the spy? If so I'll try to add some kind of check to remove one of the dropped hats (I hope it has properties that show it belongs to the player, m_hOwnerEntity or something).
Thank you for your input, I hope I can resolve this problem.

(I cannot test this myself as I do not have a server and my router doesn't forward ports properly, and of course bots don't have hats).
__________________

Last edited by eee; 01-02-2010 at 14:13. Reason: clarification
eee is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-02-2010 , 12:23   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #19

Quote:
Originally Posted by Jindo View Post
Well I may have found something, the only issue is that it involves the use of an extension, if that's not a problem for you then here goes:

SDKHooks has a TraceAttack hook which can get the hitbox and hitgroup of the victim, I'll look in to this a little later and see if I can make any use of it.
TF2 does not populate/use the hitbox/hitgroup info.
psychonic is offline
eee
Member
Join Date: Aug 2009
Old 01-02-2010 , 14:11   Re: TF2DECAP: Heads will roll! (Decapitation plugin)
Reply With Quote #20

Quote:
Originally Posted by psychonic View Post
TF2 does not populate/use the hitbox/hitgroup info.
Oh. So the way I'm doing it is the only way? I guess that makes me feel better, I just wish there was a way to make any headshot count. Glad you posted, I'd still be worrying about that
__________________
eee 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:04.


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