NeoUI - Full server queuing + automatic joining#1913
NeoUI - Full server queuing + automatic joining#1913nullsystem wants to merge 3 commits intoNeotokyoRebuild:masterfrom
Conversation
2d1985d to
ca41ffd
Compare
ca41ffd to
38f59fd
Compare
38f59fd to
def4bac
Compare
On entering a server, a ping-reply is now sent to the server to get the most up to date players count upon entering. Auto-join is determined if the server's full when trying to enter, and if so enters an auto-join state where it'll refresh for 15s checking count then entering when there's a free slot available. The auto-join popup bar stays on any states. * fixes NeotokyoRebuild#1298
def4bac to
fa8cf45
Compare
Now with passworded server auto-join, it'll prompt first and save the password rather than only prompting on joining in.
9068c58 to
357ec24
Compare
|
@sunzenshen Code review changes and changed password servers from only prompting on auto-join to prompting from beginning of auto-join and using that password: 357ec24 |
|
Ill review the PR properly tomorrow, but having skim read it I should point out that if bots are set up to automatically vacate when a player joins, then the bot manager will maintain the number of bots such that there is always space on the server for a player to join |
|
Yeah so my understanding from reading the code is that in OnEnterServer, if the number of players without bots is greater than or equal to the max number of players, the gameserveritem gets saved to the autojoin thing and we enter the autojoin state. What this doesn't take into account is that if the server is set up to auto kick bots to allow players to join, there will always be an empty spot on the server until the server is next to full and there are no bots in the server, and if the server is not set up to auto kick bots then we can't assume that just because there are fewer real people than the max number of players, that the local player can join the server. In both cases, we should therefore be comparing the total number of players including fake ones against the max number of players. |
|
@AdamTadeusz Not sure what you mean by the first part since it does already logically assume the server kicks the bots by excluding it from the player count? Then if the server doesn't kick bots then it'll have to utilize tags to determine that which might work out. Why would the bot count even need to be included for case where the server will kick them out anyway? It's no different to no-bots servers. |
|
And for the case about bots filling/kicking, the convar |
|
I've thrown it as a separate PR: #1935 as it's an extra feature. But otherwise the current one works as intended. |
|
It's not an extra feature and you don't need to pass the convar as a server tag. If the server is set to automatically kick bots to allow players to join, then as long as there are bots on the server, the returned player count including bots will always be less than the max number of players that can join the server, because neo_bot_manager will maintain the number of bots such that there is always an empty slot in the server. If the server is set up to not automatically kick bots to allow players to join, then neo_bot_manager will not do that, and in situations where player count + bot count is equal to the max number of players on the server the player will not be able to join. In both cases there's no need for a client joining the server to do any special checks, a single comparison of the total number of players including bots against the max number of players will correctly predict whether the player can join the server immediately or whether they need to join the queue. No need to read any server tags or work out what settings the server is using |


Description
On entering a server, a ping-reply is now sent to the server to get the most up to date players count upon entering. Auto-join is determined if the server's full when trying to enter, and if so enters an auto-join state where it'll refresh for 15s checking count then entering when there's a free slot available. The auto-join popup bar stays on any states.
Toolchain
Linked Issues