ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
634 stars 74 forks source link

[CSS] Server's SetupBones doesn't use inverse kinematics. #6302

Open XutaxKamay opened 2 weeks ago

XutaxKamay commented 2 weeks ago

As far as I am aware of, in CS:S or even probably in CS2 inverse kinematics are not used which results in hitboxes mismatching between server and client. For example arms are being different on server and client while just being idle:

Server: image

Client: image

This is because m_pIk is never enabled (allocated with CIKContext) server-side, so it is never used.

But since the client does initializes it: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/client/c_baseanimating.cpp#L2917, it results bones being not the same as the server ones and could be potentially fatal for a better hit registration. It can also affect legs or some other complex kinematics.

A simple EnableServerIK() inside CCSPlayer's server structure or using ENTCLIENTFLAG_DONTUSEIK client side in C_CSPlayer structure, if there's not any other side effects, should be enough to fix the issue.

I believe this issue should also affect any Source Engine games that doesn't enable IKs.

Nairdaa commented 2 weeks ago

Kamay is best. Valve should listen to him more.

NULLYUKI commented 2 weeks ago

@NimaJafariComp Why are you posing the same comment twice and upload on two different file hoster? @kisak-valve This seems a bit suspicious in my opinion.

NULLYUKI commented 2 weeks ago

@kisak-valve We got another Bot that shares a malicious file.