Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Essentially, if some packets are slowed down in transit, or there's a holdup, and we end up clicking draw again, sometimes after 3-4 seconds we suddenly draw 2 cards. What this does it asserts, when receiving a game action, that we haven't made another game action within the last 30ms. That should solve most of these issues (where the issue is the packet making it to the server, rather than the packet making it back), and should also solve double-clicking mice.
We can do most of the work to fix lag, but there will always be random path issues for random users at random times, or users with spotty connections, so this will always be relevant.
From my testing, this works fine, but right now it makes every single unit test in the game fail, so there's clearly something significant I need to change 😂
Closes #5213