Raised This Month: $62 Target: $400
 15% 

SDKHook ShouldCollide


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RumbleFrog
AlliedModders Donor
Join Date: Dec 2016
Location: US
Old 03-18-2017 , 19:04   SDKHook ShouldCollide
Reply With Quote #1

Regarding SDKHook's ShouldCollide, is there a way to get entity index of what it's colliding with?

Also is there a documentation on this CB explaining collisiongroup, contentsmask and originalResult.

Code:
function bool(int entity, int collisiongroup, int contentsmask, bool originalResult)
RumbleFrog is offline
RumbleFrog
AlliedModders Donor
Join Date: Dec 2016
Location: US
Old 03-18-2017 , 21:18   Re: SDKHook ShouldCollide
Reply With Quote #2

From some testing, it seems like contentsmask stays the same for the same type of collision, is this true?
RumbleFrog is offline
teigrgwyn
Junior Member
Join Date: Jan 2016
Location: California
Old 03-19-2017 , 06:10   Re: SDKHook ShouldCollide
Reply With Quote #3

https://developer.valvesoftware.com/...llision_Groups
https://developer.valvesoftware.com/wiki/MASK_Types

Finally, the last result is whether the two objects should collide. Seeing as how the function is called when objects are actually colliding, changing the value determines whether they will collide or not.

Depending on which version of Source you are working with, you'll have different results and luck with different groups and masks.
teigrgwyn is offline
Nerus
Senior Member
Join Date: Aug 2010
Location: Poland
Old 05-17-2019 , 15:28   Re: SDKHook ShouldCollide
Reply With Quote #4

Is a good place this question:

how to get targets (clients) on the path of thrown nade (projectile) without checking every time the whole path (loop)?

Last edited by Nerus; 05-17-2019 at 15:28.
Nerus is offline
quasemago
Member
Join Date: Dec 2018
Location: Brazil
Old 05-18-2019 , 14:09   Re: SDKHook ShouldCollide
Reply With Quote #5

Try CollisionHook ext: https://forums.alliedmods.net/showthread.php?t=197815
__________________
I accept requests for plugins and configuration of servers.

quasemago 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 23:14.


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