Raised This Month: $319 Target: $400
 79%   Almost there!

Detect if TraceAttack hit world (wallshot)?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
elymination
New Member
Join Date: Jul 2020
Old 09-09-2021 , 17:05   Detect if TraceAttack hit world (wallshot)?
Reply With Quote #1

hey.
I am working on a plugin and I am using DHooks to hook TraceAttack.
is there a way to know whether or not the hit was done through a surface? I tried a lot of things to no avail (reading a bunch of CTakeDamageInfo members, CBaseTrace::plane, CGameTrace::surface, etc).

maybe TraceAttack is not what I need in this case?

any help would mean a lot! thanks <3
elymination is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 09-10-2021 , 03:56   Re: Detect if TraceAttack hit world (wallshot)?
Reply With Quote #2

https://github.com/Ilusion9/block-wa..._walldamage.sp
This might help.
__________________
Ilusion9 is offline
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru. Komsomol-on-Amur
Old 09-10-2021 , 17:16   Re: Detect if TraceAttack hit world (wallshot)?
Reply With Quote #3

What is the reason not to use TR_TraceRayFilterEx(for example, TR_EnumerateEntities)?
Why DHooks? DHooks is outdated, and in my opinion is not supported anymore.

Last edited by tonline_kms65; 09-10-2021 at 17:18.
tonline_kms65 is offline
Psyk0tik
AlliedModders Donor
Join Date: May 2012
Location: Homeless
Old 09-10-2021 , 17:39   Re: Detect if TraceAttack hit world (wallshot)?
Reply With Quote #4

Quote:
Originally Posted by tonline_kms65 View Post
What is the reason not to use TR_TraceRayFilterEx(for example, TR_EnumerateEntities)?
Why DHooks? DHooks is outdated, and in my opinion is not supported anymore.
This fork of DHooks is what most people refer to as "DHooks" nowadays and it's still supported and widely used.
__________________
AFK like JFK
--
Donate to Motivate
--
Get updated L4D/L4D2 gamedata signatures here.
--
PM me if you need help with finding signatures and/or offsets in the following games: L4D1&2/CSGO/TF2/NMRIH/INS/DODS/CSS/HL2DM
Psyk0tik is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 09-11-2021 , 03:07   Re: Detect if TraceAttack hit world (wallshot)?
Reply With Quote #5

Maybe https://sm.alliedmods.net/new-api/sd...GetSurfaceName
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
elymination
New Member
Join Date: Jul 2020
Old 09-11-2021 , 12:56   Re: Detect if TraceAttack hit world (wallshot)?
Reply With Quote #6

I should indeed be able to trace between both entities eyePos to detect a wallshot, but I am also looking for a way to be able to force the attack to be through a wall.

in my specific case, I am redirecting shots to the head. right now, if I shoot a visible hand, it will deal a headshot without it being considered a wallbang. I would like to be able to fix that (i.e. if a player is damaged, I need to detect if the head is visible. if not, it should deal a wallshot to the head).

I will continue to investigate
elymination is offline
Reply


Thread Tools
Display Modes

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 10:43.


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