Raised This Month: $9 Target: $400
 2% 

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-31-2020 , 06:26   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #781

Quote:
Originally Posted by bakugo View Post
Is it normal that multiple plugins can't detour the same function at the same time? Is there any way around this?
Multiple plugins can detour the same function, but the act of detouring changes the bytes of the function so the "normal" signature wont match. Generally you can workaround it by wildcarding the first 6 bytes of the signature.
__________________
asherkin is offline
bakugo
Junior Member
Join Date: Nov 2012
Old 08-01-2020 , 16:27   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #782

Quote:
Originally Posted by asherkin View Post
Multiple plugins can detour the same function, but the act of detouring changes the bytes of the function so the "normal" signature wont match. Generally you can workaround it by wildcarding the first 6 bytes of the signature.
That makes sense, thanks.
bakugo is offline
maclarens
Junior Member
Join Date: Jul 2020
Old 08-10-2020 , 06:28   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #783

L 08/10/2020 - 16:24:49: [SM] Exception reported: Failed to get CreateInterface
L 08/10/2020 - 16:24:49: [SM] Blaming: dhooks-test.smx
L 08/10/2020 - 16:24:49: [SM] Call stack trace:
L 08/10/2020 - 16:24:49: [SM] [0] SetFailState
L 08/10/2020 - 16:24:49: [SM] [1] Line 99, dhooks-test.sp::OnPluginStart
L 08/10/2020 - 16:24:49: [SM] Unable to load plugin "dhooks-test.smx": Error detected in plugin startup (see error logs)


SourceMod Version: 1.10.0.6492
SourcePawn Engine: 1.10.0.6492, jit-x86 (build 1.10.0.6492)
SourcePawn API: v1 = 5, v2 = 12
Compiled on: Jul 24 2020 20:07:18
Built from: https://github.com/alliedmodders/sou...commit/250886f
Build ID: 6492:250886f
http://www.sourcemod.net/

Last edited by maclarens; 08-10-2020 at 06:37.
maclarens is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-10-2020 , 06:47   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #784

The dhooks-test plugin is a reference for plugin developers to use DHooks, you shouldn't be trying to run it.
__________________
asherkin is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 08-10-2020 , 17:59   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #785

Quote:
Originally Posted by asherkin View Post
Multiple plugins can detour the same function, but the act of detouring changes the bytes of the function so the "normal" signature wont match. Generally you can workaround it by wildcarding the first 6 bytes of the signature.
Would it be better to create a forward in such cases ?
__________________
Spirit_12 is offline
maclarens
Junior Member
Join Date: Jul 2020
Old 08-12-2020 , 17:18   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #786

Quote:
Originally Posted by asherkin View Post
The dhooks-test plugin is a reference for plugin developers to use DHooks, you shouldn't be trying to run it.
thx!
maclarens is offline
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 08-19-2020 , 08:39   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #787

Exist offests for ServerPrintf as for ClientPrintf?
__________________

Last edited by _GamerX; 08-19-2020 at 08:39.
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
Alienmario
Senior Member
Join Date: Aug 2013
Old 08-22-2020 , 05:49   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #788

I really would love it if dhooks-detours made it into main SM release. That'd be one less dependency for instructing end users (it's also the only extension a project I work on depends on).
And yes, I've seen the pull request.
Alienmario is offline
Accelerator74
AlliedModders Donor
Join Date: Dec 2010
Location: Russia
Old 08-24-2020 , 02:30   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #789

Аfter sourcemod 1.11.6609 and above, dhooks detours causes server crashes on startup. After updating sdkhooks extension (OnEntitySpawned forward)
Code:
---- Host_NewGame ----
maxplayers set to 32
Host_NewGame on map c1m1_hotel
ConVarRef room_type doesn't point to an existing ConVar
Executing dedicated server config file
./srcds_run: line 341:  5383 Segmentation fault      $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Even the "Accelerator" extension fails to create a crash dump.
__________________

Last edited by Accelerator74; 08-24-2020 at 02:34.
Accelerator74 is offline
Send a message via ICQ to Accelerator74
xerox8521
Senior Member
Join Date: Sep 2011
Old 08-24-2020 , 20:16   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #790

Would it be possible to add a return type that skips the game function call entirely for void functions ?
Currently it explicity checks when using MRES_Supercede.
xerox8521 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 14:19.


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