[#21 Bug] Fix : Credits stops working after a client is dropping early.#28
Open
Natanel-Shitrit wants to merge 1 commit intoshanapu:masterfrom
Open
[#21 Bug] Fix : Credits stops working after a client is dropping early.#28Natanel-Shitrit wants to merge 1 commit intoshanapu:masterfrom
Natanel-Shitrit wants to merge 1 commit intoshanapu:masterfrom
Conversation
This file contains hidden or 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
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.
This is a bug fix for #21.
Explanation:
When a client is connecting, he can disconnect (drop from the server) before reaching the
OnClientPostAdminCheck()forward, which results an unwanted behavior, he doesn't add up into the count variable (g_iClientCount) but makes the counter subtract 1 from it when he reaches theOnClientDisconnect()forward.This can cause the the counter to be wrong.
This result a wrong outcome in the minimum players checks.
and because of that, credits are not being added. (for example in here)
Thanks for @penalte for testing and confirming #21 bug is resolved.