View Single Post
nosoop
Veteran Member
Join Date: Aug 2014
Old 06-12-2019 , 06:58   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #680

Quote:
Originally Posted by Dr!fter View Post
You can pm the code, i cant guarantee when id look at it though.
Cool; I'll trim down the code and make sure it's reproducible.

Quote:
Originally Posted by Shadowysn View Post
[...] is it possible to create a CTakeDamageInfo object? If so, how?

I'd also like to know how to get CTakeDamageInfo from the OnTakeDamage function.
You might be able to allocate a CTakeDamageInfo on the SourcePawn stack as an int[], or you could try passing in a pointer from Source Scramble's MemoryBlock handle. Haven't taken an in-depth look at either approach. I'd say both are absolutely filthy hacks.

You can get info with DHook OnTakeDamage with an objectptr passed in byref, then get the information with DHookGetParamObjectPtrVar.
SM-TFOnTakeDamage implements that.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline