|
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
|
03-17-2017
, 16:23
Re: [TF2] Projectile Collision
|
#6
|
Quote:
Originally Posted by Chaosxk
I think SDKHooks should work.
Code:
public void OnEntityCreated(int entity, const char[] classname)
{
if (StrContains(classname, "tf_projectile_") != -1)
{
SDKHook(entity, SDKHook_Touch, Hook_Touch);
//Forgot which touch hook to use, one of them gave me troubles
//SDKHook(client, SDKHook_StartTouch, Hook_Touch);
}
}
public void Hook_Touch(int entity, int other)
{
char other_classname[32];
GetEntityClassname(other, other_classname, sizeof(other_classname));
if (StrContains(other_classname, "tf_projectile_") != -1)
{
//do something
}
}
|
Interesting, I thought I needed to constantly do tracerays on the projectile. I'll try this and report back
Last edited by RumbleFrog; 03-17-2017 at 16:24.
|
|
|
|