Quote:
Originally Posted by Chaosxk
I think SDKHooks should work.
Code:
public void OnEntityCreated(int entity, const char[] classname)
{
if (StrContains(classname, "tf_projectile_"))
{
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_"))
{
//do something
}
}
|
Oh, so then I do know the answer somewhat! I had a brain fart when I made that first post and completely forgot to mention to use SDK Hooks to make the modification despite me having just released
a plugin that modifies projectiles. I am a doofus sometimes.
But yeah, use the SDK code up there (because I use SDKHooks in my Enhanced Rockets plugin which changes the projectile model) and where it says "do something", that's where you would send the new collision data to the projectile.