-
-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import DHooks as first-party extension #1629
Conversation
This is the latest DHooks version from https://github.com/peace-maker/DHooks2/tree/1314f2d1b4d870677a1b9f628c770f2799878f9b
This helped catch a bug in DHooks before, so it's worth adding it in here as well.
I frequently have one like `buildwin` and `buildlin` for the different OS in WSL.
I have a few questions (I probably looked at but forgot now…) What happens if two plugins detour the same function? Does one clobber the other? I think it’s still better to add a detour library to MM:S (along the lines of sourcehook) so we don’t have plugins/extensions clobbering each other. Also, I can’t remember this. Is it possible to access object param address to get data? I know it’s possible to get object values. Example object->object->thisval ? If not, we should consider adding this probably? on another note, thanks for all your hard work on dhooks over the years! |
They are added to the plugin callback list of the same detour and get their callbacks called in sequence. The highest
Yes, very true. It just needs someone to do it and DHooks can be moved to that other library when it's available.
🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - would definitely like the sigscan cache in before 1.11 is branched though.
Since DHooks with dynamic detouring is widely used by plugin developers nowadays, we decided to adopt the extension as a base feature of SourceMod. #981 made a first proposal of importing the original DHooks extension, but since most users switched to the fork which adds detouring support in addition to dynamic vtable hooking, it seemed better to import the forked version.
This is the latest DHooks version from https://github.com/peace-maker/DHooks2/tree/1314f2d1b4d870677a1b9f628c770f2799878f9b
@Drifter321 and I both agreed to transfer the copyright of the code to Alliedmodders LLC. To implement dynamic detouring for plugins the DynamicHooks library by @Ayuto was adopted. Thank you again!
This is a straight import of the latest version including the fixes and enhancements that didn't make it into a new release yet. There was no effort made to streamline the implementation with other code inside SourceMod.
Supercedes #981