Raised This Month: $128 Target: $400
 32% 

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 04-30-2019 , 18:22   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #671

Quote:
Originally Posted by Powerlord View Post
You forgot to mention that you only need one extension recompiled (DHooks itself) when you change to newer versions of SourceMod rather than recompiling all of them.
This point to me is meh, in most cases we dont break interfaces (this previous break was due to 64bit support) So recompiling due to SM is rather rare (unless your require something new), I was also assuming all in one extension.
Dr!fter is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 05-06-2019 , 13:40   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #672

There is a build against SourceMod 1.10 in the release post of the detour fork now.
__________________
Peace-Maker is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Brexit
Old 05-06-2019 , 16:54   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #673

Quote:
Originally Posted by Peace-Maker View Post
There is a build against SourceMod 1.10 in the release post of the detour fork now.
Thanks for Dhooks Dr!fter and peace-maker for detours.

Peacemaker any chance we can get object returns, or the ability to not need a return, kinda like the "this" "ignore"

but for returns

like so

"return" "ignore".

so dhooks don't need to find the return address?


I don't really know the inner workings of dhooks or if it needs the returns.
__________________
Lux is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-06-2019 , 17:09   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #674

Quote:
Originally Posted by Lux View Post
Thanks for Dhooks Dr!fter and peace-maker for detours.

Peacemaker any chance we can get object returns, or the ability to not need a return, kinda like the "this" "ignore"

but for returns

like so

"return" "ignore".

so dhooks don't need to find the return address?


I don't really know the inner workings of dhooks or if it needs the returns.
No, it is not technically possible to ignore the return value, it's presence and type affects the way the function is hooked/called.
__________________
asherkin is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Brexit
Old 05-06-2019 , 21:11   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #675

Ahh ok i thought so
__________________
Lux is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 05-29-2019 , 23:20   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #676

Might be running into an issue with setting values on charptr returns that are set to null -- the first four characters are being overwritten.

Not sure if I can provide my test code publicly here since it could lead to abuse; it's related to modifying the map name displayed in the server browser. Drifter / Peace-Maker can shoot me a PM if they'd like some code to reproduce it, I suppose.

Tested against and affects both DHooks 2.2.0 and the latest dynhooks on SM 1.9 on Linux (TF2), with both vtable- and detour-style hooks.
__________________
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)

Last edited by nosoop; 05-31-2019 at 01:59.
nosoop is offline
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 06-08-2019 , 07:09   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #677

Have a bug:

Using DHookSetParamString with MRES_ChangedHandled in a Pre hook. First 2 bytes are garbage then the rest of string appears as modified. Linux/Windows in L4D2 and CS:GO.

Reading the data is fine in L4D2 but CS:GO simply reading the string corrupts that memory with garbage.

Tested on SM 1.9 and SM 1.10 with both dHooks versions attached.
__________________
Silvers is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 06-09-2019 , 12:35   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #678

Quote:
Originally Posted by nosoop View Post
Might be running into an issue with setting values on charptr returns that are set to null -- the first four characters are being overwritten.

Not sure if I can provide my test code publicly here since it could lead to abuse; it's related to modifying the map name displayed in the server browser. Drifter / Peace-Maker can shoot me a PM if they'd like some code to reproduce it, I suppose.

Tested against and affects both DHooks 2.2.0 and the latest dynhooks on SM 1.9 on Linux (TF2), with both vtable- and detour-style hooks.
Quote:
Originally Posted by Silvers View Post
Have a bug:

Using DHookSetParamString with MRES_ChangedHandled in a Pre hook. First 2 bytes are garbage then the rest of string appears as modified. Linux/Windows in L4D2 and CS:GO.

Reading the data is fine in L4D2 but CS:GO simply reading the string corrupts that memory with garbage.

Tested on SM 1.9 and SM 1.10 with both dHooks versions attached.
You can pm the code, i cant guarantee when id look at it though.

Last edited by Dr!fter; 06-09-2019 at 12:35.
Dr!fter is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 06-12-2019 , 06:11   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #679

So coming from the [L4D2] cs ragdoll usage? thread, 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.
Shadowysn is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 06-12-2019 , 07: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
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 16:34.


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