Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corruption server demos #433

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Caball009
Copy link
Contributor

It's currently possible for server demos to get corrupted. This happens when delta snapshots rely on data from older snapshots that are not included in the demo.

This is currently untested hence a draft pr. This problem has previously been mentioned in #394 220e324 but not yet fixed.


client->unksnapshotvar = 1;
// if the client is up-to-date, or the demo has been waiting for PACKET_BACKUP (32) or more snapshots, start the demo with a non-delta snapshot
if (client->netchan.outgoingSequence - client->deltaMessage == 1 || client->netchan.outgoingSequence - client->demoRequestedSequence >= PACKET_BACKUP)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

client->netchan.outgoingSequence - client->deltaMessage == 1
I've no idea if this works correctly, but the idea is to find some logic that limits the maximum number of non-delta snapshots / frames to the absolute minimum, just one.

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