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

Server: Delta snapshot developer print fix #317

Merged
merged 1 commit into from
Jan 25, 2025
Merged

Conversation

Chomenor
Copy link
Contributor

Since 3f92ee4 client->deltaMessage is set to client->netchan.outgoingSequence - (PACKET_BACKUP + 1) as a way to disable delta snapshots. Developer warnings like "Delta request from out of date packet" are not printed when client->deltaMessage matches this exact expression, but as client->netchan.outgoingSequence is incremented, warning messages may be printed when they shouldn't be.

This fix restores the behavior that client->deltaMessage is set to -1 to disable delta snapshots, allowing developer prints to correctly distinguish between delta being disabled intentionally versus by PACKET_BACKUP limit.

@ec-
Copy link
Owner

ec- commented Jan 17, 2025

client->deltaMessage is for relative timings only, you shouldn't revert back to an absolute timestamps (things that I want to get rid as much as possible in a whole codebase) so if some fancy developer printouts is a price for that - it is an acceptable "loss"

Add deltaActive client variable to indicate whether delta snapshots are enabled, instead of relying on whether deltaMessage value is in range. Allows developer prints to correctly distinguish between delta being disabled intentionally versus by PACKET_BACKUP limit.
@Chomenor
Copy link
Contributor Author

I changed it to use a separate variable to hold whether delta snapshots are active.

@ec- ec- merged commit a33f41f into ec-:master Jan 25, 2025
24 checks passed
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.

2 participants