Open Maxi605 opened 3 years ago
That's already possible by using this engine function: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/engine/eiface.h#L245
The function returns whether the player's cl_lw
setting is non-zero.
The server already uses this to determine whether a client is using client predicted weapons and skips sending weapon animation updates if so: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/weapons.cpp#L866-L884
ENGINE_CANSKIP
is a macro that resolves to that function:
https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/enginecallback.h#L142
Implement a server-side cvar to allow the server to work if a client is using Server-Side weapon prediction (cl_lw 0). Since it seems that the whole CS 1.6 Community used to (Used to since they moved to CS:GO) considered cl_lw 0 to be a "Ilegal Command".