-
Notifications
You must be signed in to change notification settings - Fork 188
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
Sync with Q2PRO: Network/protocol changes #369
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will break sound from player's own entity when playing a MVD without dummy MVD observer spawned and chasing a player.
Set minimum Q2PRO protocol version to 1015, which was added more than 13 years ago in r335.
Also implement for old netchan.
From a description of deflate() it seems like one should always allocate buffer big enough for the worst case compression using deflateBound() in order for deflate(Z_FINISH) to succeed in one call. While it doesn't seem to be the case in practice, and deflate(Z_FINISH) will succeed as long as there is enough space for compressed data, restructure code to always perform compression into statically allocated buffer that's big enough to hold deflateBound(MAX_MSGLEN) bytes.
The server will never send such packet, but this happens in some (possibly edited) demos.
Previously, maximum download size was limited by MAX_LOADFILE which was 4 MiB originally, later bumped to 16 MiB and finally 64 MiB. This is too much for UDP downloads, which are kept in memory until client stops downloading. Make maximum download size configurable and change it to be just 8 MiB by default.
No point sending if it matches from->origin, same with new entities.
Pack angles using ANGLE2SHORT() unconditionally. Simply downscaling packed value to a byte works.
Previously changing e.g. ‘net_ip’ to bad value would crash the server. Just print a warning and give server operator a chance to correct it.
Always fully disconnect and reconnect when user types ‘reconnect’ at console.
Don't print ‘can't reconnect to loopback’ if local server is running. Client will auto reconnect anyway.
Requested in NVIDIA#260.
This was undocumented and obscure feature. Just use ‘cl_protocol’.
Pass non-zero value only when using R1Q2 protocol.
Only allow extrabits on few specific commands and only when protocol version allows it. Prevents possible covert information exchange.
Default limit of 100 is just too low. Misconfigured clients using rate 100 can take minutes to enter a server, raise minimum rate to 1500 to prevent this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Upstream changes related to the network protocol.