server
server copied to clipboard
Implement rehosting
There is a game command called Rehost
which is sent by the game when a player clicks the rehost button. This is currently ignored, and as far as I can tell, simply closes the game for the user after sending the message. However, we could have the server respond by automatically triggering a game_host
command, and maybe even go so far as to trigger game_join
commands for every player that was connected to the lobby. I think we don't need to worry too much about game settings as these will be remembered on the client side, and sent by the host again when the game re-opens. We might need to remember the mapname though.
Rehosting closes the game and hosts a new lobby with the same settings already. Autojoining all players might be open to discussion. In my experience most games are rehosted because someone(or multiple players) is/are lagging or have disconnects at the beginning of the game. So you dont want everyone again. At the moment everyone who wants to try the same game again can just join the rehosted lobby manualy. It would be annoying to be pulled into a game one do not want to join again or is not wanted to. additionaly everyone can rehost a game, even if he is not the original host. that would cause more problems if multiple players rehost at the same time. I suggest to close this issue.
@Askaholic i think this can be closed
I think game rehosting is still not functioning correctly. Maybe it's more of a game or client problem than a server problem, but I still want to have this issue just to keep reminding us that there is a problem. I think some stuff could also be done on the server. For instance when rehosting a game we could have the server re-use the game id.
I don't think we would want to reuse the game id. Just because a game is rehosted doesn't mean the original game was invalid. It would also break a lot of assumptions about the game IDs being unique and static I think