Raised This Month: $12 Target: $400
 3% 

[ANY] Hit Registration Fix Plugin (bullet displacement by 1 tick)


Post New Thread Reply   
 
Thread Tools Display Modes
AbraCadabra
Member
Join Date: Aug 2013
Old 04-09-2019 , 09:04   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #11

Quote:
Originally Posted by Xutax_Kamay View Post
Anyone mind testing the build I've done for windows? Since my slow internet connection can't download a 5gb dedicated server.. Thanks. (Sadly you can't load plugins anymore through listen servers even with -insecure)
i can do it
AbraCadabra is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 04-09-2019 , 09:09   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #12

Quote:
Originally Posted by Xutax_Kamay View Post
I already mailed them about this years ago, but they never paid attention I think. There is even a pullrequest, so yeah, maybe they think the fix is not worth it, I really don't know

Oh really? That's odd... Maybe I got misunderstood, did you try to use sourcemod with a csgo dedicated server or csgo client (graphical stuff where you play on) ?
Cause it never worked on the csgo client for me, on CSS and in older versions of CSGO you could just load plugins with insecure parameter, but that's not really anymore the case for me, so I'm wondering why it does work for you, maybe I'm doing something wrong.
yeah, i'm running plugins with -insecure on the local server from the csgo client.
__________________

Last edited by Ilusion9; 04-09-2019 at 09:09.
Ilusion9 is offline
Xutax_Kamay
Member
Join Date: Feb 2016
Old 04-09-2019 , 16:33   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #13

Quote:
Originally Posted by Ilusion9 View Post
yeah, i'm running plugins with -insecure on the local server from the csgo client.
S̶e̶e̶m̶s̶ ̶l̶i̶k̶e̶ ̶I̶ ̶c̶a̶n̶'̶t̶ ̶g̶e̶t̶ ̶i̶t̶ ̶w̶o̶r̶k̶i̶n̶g̶,̶ ̶I̶ ̶w̶o̶n̶d̶e̶r̶ ̶w̶h̶y̶,̶ ̶a̶r̶e̶ ̶y̶o̶u̶ ̶d̶o̶i̶n̶g̶ ̶s̶o̶m̶e̶t̶h̶i̶n̶g̶ ̶e̶l̶s̶e̶ ̶i̶n̶ ̶o̶r̶d̶e̶r̶ ̶t̶o̶ ̶m̶a̶k̶e̶ ̶i̶t̶ ̶l̶o̶a̶d̶?̶ ̶(̶I̶ ̶w̶o̶u̶l̶d̶ ̶j̶u̶s̶t̶ ̶b̶y̶t̶e̶p̶a̶t̶c̶h̶ ̶t̶h̶e̶ ̶e̶n̶g̶i̶n̶e̶ ̶b̶u̶t̶ ̶y̶e̶a̶h̶,̶ ̶n̶o̶)̶

EDIT: it actually works on windows, but not on linux.

I got a lot of problems hooking the firebullets functions on csgo. The calling convention is uh.. Well, it's right but the windows arguments are totally not the same as linux, so to make it portable and the easiest possible, I need to find a new way (wich I already did) but needs testing. The idea is to hook WeaponShootPosition vtable from player class. It should work pretty good. (so it can be done under sourcemod, I'll give a try)

Last edited by Xutax_Kamay; 04-10-2019 at 00:02.
Xutax_Kamay is offline
hambooga
Junior Member
Join Date: Oct 2018
Old 04-10-2019 , 00:28   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #14

I compiled using visual studio 2019 and installed the plugin on a CS:GO 10man/pug server that I'm an admin on and it'd crash the server whenever someone/a bot would shoot. I tried to load the plugin using console and it said failed to load plugin, blah blah something to do with not being able to call API or w/e. The crashing started after I restarted the server.
I'm looking forward to using this plugin a ton especially since I've been receiving a lot of complaints about people's bullets on things such as vents and vice versa show up but have no affect on them.

Last edited by hambooga; 04-10-2019 at 00:35.
hambooga is offline
Xutax_Kamay
Member
Join Date: Feb 2016
Old 04-10-2019 , 01:02   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #15

Quote:
Originally Posted by hambooga View Post
I compiled using visual studio 2019 and installed the plugin on a CS:GO 10man/pug server that I'm an admin on and it'd crash the server whenever someone/a bot would shoot. I tried to load the plugin using console and it said failed to load plugin, blah blah something to do with not being able to call API or w/e. The crashing started after I restarted the server.
I'm looking forward to using this plugin a ton especially since I've been receiving a lot of complaints about people's bullets on things such as vents and vice versa show up but have no affect on them.
It's not working yet on windows, be patient, I'm doing a sourcemod plugin for it now.

Last edited by Xutax_Kamay; 04-10-2019 at 03:56.
Xutax_Kamay is offline
sazonische
Senior Member
Join Date: Dec 2013
Old 04-15-2019 , 10:38   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #16

line 41
g_hWeapon_ShootPosition = DHookCreate(offset, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity);
replace
g_hWeapon_ShootPosition = DHookCreate(offset, HookType_Entity, ReturnType_Vector, ThisPointer_CBaseEntity);
__________________
my steam LINK
sazonische is offline
Send a message via Skype™ to sazonische
Xutax_Kamay
Member
Join Date: Feb 2016
Old 04-16-2019 , 07:30   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #17

Quote:
Originally Posted by sazonische View Post
line 41
g_hWeapon_ShootPosition = DHookCreate(offset, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity);
replace
g_hWeapon_ShootPosition = DHookCreate(offset, HookType_Entity, ReturnType_Vector, ThisPointer_CBaseEntity);
You're right, thanks, though it does still crash with Vector, I've changed it to Int by hoping to get an address earlier but yeah, seems like it didn't turn out to work anyway.
I get the return perfectly, it just when I try to set it that it crashes, I just need to debug out the extension when I've time (probably needs recompiling n stuff)

But I'm not refusing any help to make this working

Last edited by Xutax_Kamay; 04-16-2019 at 07:52.
Xutax_Kamay is offline
sazonische
Senior Member
Join Date: Dec 2013
Old 04-16-2019 , 15:20   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #18

Quote:
Originally Posted by Xutax_Kamay View Post
You're right, thanks, though it does still crash with Vector, I've changed it to Int by hoping to get an address earlier but yeah, seems like it didn't turn out to work anyway.
I get the return perfectly, it just when I try to set it that it crashes, I just need to debug out the extension when I've time (probably needs recompiling n stuff)

But I'm not refusing any help to make this working
No, everything works
__________________
my steam LINK
sazonische is offline
Send a message via Skype™ to sazonische
Xutax_Kamay
Member
Join Date: Feb 2016
Old 04-16-2019 , 21:13   Re: [CS:GO] fire bullet fix (hit registration fix plugin)
Reply With Quote #19

Quote:
Originally Posted by sazonische View Post
No, everything works
That's very odd, because it doesn't for me. What mm/sm version you're using?

By the way, to make it work you need to set MRES_Supercede instead of MRES_Ignored (otherwhise the return value gets simply ignored), if you did that change and it worked, then good for you, otherwhise it's the same behavior I have currently.

After further investigations, the crash seems to appear at on line 749 on vhook.cpp of dhooks extension:

Code:
*vec_result = **(SDKVector **)returnStruct->newResult;
**(SDKVector **) is wrong it should be *(SDKVector *)

because of how is working this native

Code:
cell_t Native_SetReturnVector(IPluginContext *pContext, const cell_t *params)
{
	HookReturnStruct *returnStruct;
	
	if(!GetHandleIfValidOrError(g_HookReturnHandle, (void **)&returnStruct, pContext, params[1]))
	{
		return 0;
	}

	cell_t *buffer;
	pContext->LocalToPhysAddr(params[2], &buffer);

	if(returnStruct->type == ReturnType_Vector)
	{
		*(SDKVector *)returnStruct->newResult = SDKVector(sp_ctof(buffer[0]), sp_ctof(buffer[1]), sp_ctof(buffer[2]));
		returnStruct->isChanged = true;

		return 1;
	}
	else if(returnStruct->type == ReturnType_VectorPtr)
	{
		returnStruct->newResult = new SDKVector(sp_ctof(buffer[0]), sp_ctof(buffer[1]), sp_ctof(buffer[2]));
		returnStruct->isChanged = true;
		
		return 1;
	}

	return pContext->ThrowNativeError("Return type is not a vector type");
}
It should work after that change, I'll keep you informed


EDIT:

Yep it works, I'll ask Drifter to make this change, and cleaning up my messy code so I can release it

EDIT2:

Should work now for both linux & windows, keep me informed if it loads correctly for you, thanks.

Last edited by Xutax_Kamay; 04-17-2019 at 03:59.
Xutax_Kamay is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 04-18-2019 , 00:00   Re: [ANY] Hit Registration Fix Plugin (bullet displacement by 1 tick)
Reply With Quote #20

Awesome release! glad you took the time to fix this issue.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.

Last edited by backwards; 04-18-2019 at 00:00.
backwards 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 12:12.


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