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

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
vanz
Junior Member
Join Date: Apr 2020
Old 04-17-2020 , 05:21   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #751

Bug:

I have incorrect platform specific sections parsing when using DHookCreateFromConf.
When a section is ignored, after leaving from it, parser thinks that we are leaving from current oversection.

Last edited by vanz; 04-17-2020 at 05:22.
vanz is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 04-17-2020 , 12:54   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #752

Quote:
Originally Posted by vanz View Post
Bug:

I have incorrect platform specific sections parsing when using DHookCreateFromConf.
When a section is ignored, after leaving from it, parser thinks that we are leaving from current oversection.
Can you please create a test plugin/gamedata that triggers that bug?
__________________
Peace-Maker is offline
vanz
Junior Member
Join Date: Apr 2020
Old 04-17-2020 , 17:11   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #753

Quote:
Originally Posted by Peace-Maker View Post
Can you please create a test plugin/gamedata that triggers that bug?
Plugin:
Spoiler

Gamedata:
Spoiler

Errors:
Spoiler

Last edited by vanz; 04-20-2020 at 07:08.
vanz is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 04-21-2020 , 09:01   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #754

Thanks I've put up a new version 2.2.0-detours10 with that fixed.

https://github.com/peace-maker/DHook...3db63393a3ca7b

Can you test if that broke something else in your plugins?
__________________
Peace-Maker is offline
vanz
Junior Member
Join Date: Apr 2020
Old 04-22-2020 , 04:30   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #755

Quote:
Originally Posted by Peace-Maker View Post
Thanks I've put up a new version 2.2.0-detours10 with that fixed.

https://github.com/peace-maker/DHook...3db63393a3ca7b

Can you test if that broke something else in your plugins?
Thanks for fix.

Now it works fine
vanz is offline
Alienmario
Senior Member
Join Date: Aug 2013
Old 05-28-2020 , 12:39   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #756

Could anyone help with CBaseEntity::AcceptInput hook as in the example?
It works correctly on windows but on linux the fourth parameter (variant_t) gives gibberish - both in the fieldtype (object offset 16) and the actual value (offset 0). Game is BMS.

Edit:
Okay, it works when the hook is configured through code. I think the "flags" keyvalue in functions might not parse correctly? This is on the latest version of dhooks-detours.
Code:
"CBaseEntity::AcceptInput"
{
	"offset"	"CBaseEntity::AcceptInput"
	"hooktype"	"entity"
	"return"	"bool"
	"this"		"entity"
	"arguments"
	{
		"szInputName"
		{
			"type"	"charptr"
		}
		"pActivator"
		{
			"type"	"cbaseentity"
		}
		"pCaller"
		{
			"type"	"cbaseentity"
		}
		"Value"
		{
			"type"	"object"
			"size"	"20"
			"flags"	"byval odtor octor oassignop"
		}
		"outputID"
		{
			"type"	"int"
		}
	}
}

Last edited by Alienmario; 05-28-2020 at 18:48.
Alienmario is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 05-29-2020 , 16:25   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #757

Whops, copy&paste devil https://github.com/peace-maker/DHook....cpp#L280-L281

Try the new version detours12
__________________

Last edited by Peace-Maker; 05-29-2020 at 16:49.
Peace-Maker is offline
Alienmario
Senior Member
Join Date: Aug 2013
Old 05-29-2020 , 17:36   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #758

Looking at the code, seems like it will only parse the first flag, in my case byval. I think you might want to remove the "elses" too Thanks.
Alienmario is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 05-30-2020 , 03:36   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #759

Quote:
Originally Posted by Alienmario View Post
Looking at the code, seems like it will only parse the first flag, in my case byval. I think you might want to remove the "elses" too Thanks.
Argh, you're right. I've tested it this time.. Sorry for the untested changes and thanks for the quick reports. Try detours13.
__________________
Peace-Maker is offline
Alienmario
Senior Member
Join Date: Aug 2013
Old 05-30-2020 , 10:55   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #760

Quote:
Originally Posted by Peace-Maker View Post
Argh, you're right. I've tested it this time.. Sorry for the untested changes and thanks for the quick reports. Try detours13.
That fixed it, thanks again.
Alienmario 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 05:29.


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