Skip to content

Only delay FakeLagProcess if no packets were handled#12

Closed
nixxquality wants to merge 2 commits intoFacepunch:masterfrom
nixxquality:fakelagfix
Closed

Only delay FakeLagProcess if no packets were handled#12
nixxquality wants to merge 2 commits intoFacepunch:masterfrom
nixxquality:fakelagfix

Conversation

@nixxquality
Copy link
Copy Markdown
Contributor

The fake lag process has a 1ms delay in it to prevent it from running at full tilt when no packets are ready to be handled.

However, if a packet is handled, the 1ms delay is still there. This means that if you have a bunch of packets coming in at the same time, they will be delayed by 1ms each, and probably be cancelled and delayed until the following frames.

This PR only uses the 1ms delay if no work was performed during the current loop iteration.
This resolves #1134 and #622

2025-11-26_10-45-28.mp4

Comment thread engine/Sandbox.Engine/Systems/Networking/Transports/Tcp/TcpChannel.cs Outdated
@lolleko lolleko added the triaged triaged pull-requests are replicated on the internal sbox repo label Nov 26, 2025
@handsomematt handsomematt added the accepted this pull request was accepted, hurrah! label Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted this pull request was accepted, hurrah! triaged triaged pull-requests are replicated on the internal sbox repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

net_fakelag causes weird behaviour when updating many objects at once

3 participants