View Single Post
Xutax_Kamay
Member
Join Date: Feb 2016
Old 01-09-2020 , 07:55   Re: [ANY] Hit Registration Fix Plugin (bullet displacement by 1 tick)
Reply With Quote #69

Quote:
Originally Posted by VerMon View Post
Why don't you keep the old eye angle as well?
Because now there is used old eye location but current direction of view.
It also plays a role, and a big one, especially at long distances.
Also, maybe will be better not to shift the tick when you attacked using knife?

Hook FireBullets function and pass old arguments instead current one by changing m_vecDirShooting and m_vecSrc.
Because m_vecSrc
itself taken from Weapon_ShootPosition, and m_vecDirShooting is calculated in place.
So the is only way.
I do not suggest to anyone doing this.

This bug occurs only for moving data (localplayer's data, the most noticeable, position one) that are processed by
Code:
CGameMovement::ProcessMovement
and used in events in PostThink +/-.


I'll try to make this more clear, for example:

- Once
Code:
CGameMovement::ProcessMovement
has processed the computation of the player's origin, your position is shifted by 1 tick:

1) Because of the rendering process (in order to smooth out the game) there is 1 tick of interpolation in the client's code (https://github.com/ValveSoftware/sou...tity.cpp#L2822) from predicted data.

2) But even if you remove interpolation, the bug will still occurs and still take the next position to shoot because the predicted data hasn't been saved yet for rendering since it is still in computation (stuck in RunCommand).

Which results to shoots from your next position and not current rendering one.

3) Since the viewangles are not modified in any ways by ProcessMovement (excepted teleportation) and sent by the user directly computed in CreateMove (ExtraMouseSample), it is not delayed.

Last edited by Xutax_Kamay; 01-09-2020 at 07:56.
Xutax_Kamay is offline