Closed Haxk20 closed 2 years ago
@xtreme8000 Can you click that merge button ? I think it had enough time in review ? (Doubt it needs any)
Would it be better if the mouse button state was reset when starting to sprint, i.e. sending a 0x00
button state to the server?
Would it be better if the mouse button state was reset when starting to sprint, i.e. sending a
0x00
button state to the server?
Hmmm. Thinking about it, it is true a user could be shooting and then without releasing shooting start sprinting. In which case when the user stops "shooting" it would not send it.
But then again OpenSpades does it the way this PR is currently and afaik we do not experience any issues from that. And still people would be able to spam the server with mouse events if we were to modify the PR to send 0x00 (0) on mouse event when sprinting.
BetterSpades was sending weapon inputs to server even when sprinting because it was checking only if the weapon input is different to previously sent one.
Fix this by checking if player is sprinting and not allowing such packet to be sent. (The packets cant do any harm really but players can spam the server with it when sprinting thus creating fake shots)