Server: Send bots to welcome cam and not allow players to leave it too soon#19
Open
rtxa wants to merge 3 commits intoLevShisterov:masterfrom
Open
Server: Send bots to welcome cam and not allow players to leave it too soon#19rtxa wants to merge 3 commits intoLevShisterov:masterfrom
rtxa wants to merge 3 commits intoLevShisterov:masterfrom
Conversation
This fix was made to don't allow player (mostly bots) to spawn instantly, this is to ensure plugins have enough time to send players to spectators when they enter.
m_bInWelcomeCam wasn't being set to his default value when the player leaves the game.
Should be enough time to send player to spectators (AMXX set_task() min value is 0.1s). This will make it unnoticeable for players.
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.
Sending connecting players to spectator mode using a task works fine, but with bots this is not the case.
This fix blocks bots spawn by sending them to welcome cam mode and letting them spawn after one second.
Basically, to send a player to spectator mode when he is connecting, you have to do it this way to avoid some scoreboard glitchs, like missing server name, entering players not having a team assigned, etc. (Check it here).
mp_welcomecamturned on)PD: Maybe this pull request requires a title change and a better explanation.