Open nzyuzin opened 7 years ago
Just to clarify, leaver's name will only be stored in db as a leaver if he fails to reconnect within the countdown time. This is for the protection of the rank if there are connection problems.
@CaptainAMN thanks!
Places in the code to start from:
Here's the method where rated game client drop logic should be implemented https://github.com/nzyuzin/rteeworlds/blob/0.6-rctf/src/game/server/ratedgame.cpp#L224
Here's the method that starts pause: https://github.com/nzyuzin/rteeworlds/blob/0.6-rctf/src/game/server/gamecontroller.cpp#L383 (can be called from the above method with GameServer()->m_pController->TogglePause())
Third point can be drafted until the support of it on db communication layer is implemented.
If it's the case, that a client disconnected during the rated game, the following actions should be performed:
If during pause someone joins to replace the leaver, resume the game.
As it's impossible now to join the game during pause, this has to be changed in the existing server code.
If none joins within 3 minutes, abort the game and send the event to the db.