Skip to content

Added sar_prevent_demo_lagspike#357

Open
betsruner wants to merge 1 commit intop2sr:masterfrom
betsruner:suppress-forceupdate
Open

Added sar_prevent_demo_lagspike#357
betsruner wants to merge 1 commit intop2sr:masterfrom
betsruner:suppress-forceupdate

Conversation

@betsruner
Copy link
Member

I don't mind if this one isn't merged, I just did like 99% of it before I accidentally proved my use-case invalid.

Due to what was almost definitely a gross misreading of a conversation I had with Mlugg I was under the impression that the reason things break in Mel when demos are recording is due to the massive lag spike from the force update.

My thought process was that the lag spike occurs because the game is syncing up the client and the server so playback is accurate. SO if we just don't care about demo playback we can tell it to not do that syncing process, prevent the lag spike, and get at least some demos for people to submit with Mel (which will at least contain some anti-cheat information and improve verification practices).
During the process I found that there are actually two full updates right after each other. One happens just due to the demo being started, the other happens because of changes to the value of cl_localnetworkbackdoor. This is when I learned that actually demo recording only breaks stuff (the things I tested) due to cl_localnetworkbackdoor being set to 0. Unfortunately this invalidates my use-case as I don't think there's any real practical way to have demos not change the value of cl_localnetworkbackdoor other than just having it at 0 prior to the demo starting (which ofc breaks the level).

The solution actually does work there are no lag spikes from demo recording after the cvar is changed (there is a one time one right when you change the cvar because it changes cl_localnetworkbackdoor to 0). The demos are also of course readable. Playback is broken but doesn't crash the game or anything, the game just fails the play them.

@betsruner
Copy link
Member Author

Yeah ngl just realized we could still require demos if we just do it through sar_record_at instead of sar_autorecord. So now I do actually care about this one getting merged, so lmk if there's anything that needs changing for approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments