Opened 9 years ago
Last modified 4 years ago
#3550 new defect
Rated game variable not set correctly — at Initial Version
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Multiplayer lobby | Keywords: | |
Cc: | Patch: |
Description
Whether or not the current game is considered a ranked game is not updated in the correct places, resulting in some rated games being considered not rated and some non-rated games being considered rated.
Code:
The variable indicating if the current game is rated is g_rankedGame
in JSInterface_Lobby.cpp
.
It will be set true whenever one joins the lobby (JSI_Lobby::StartXmppClient
) and it will be set from the gamesetup only (JSI_Lobby::SetRankedGame
which is only called from gamesetup.js
whenever that checkbox changes).
However that's not sufficient to set the variable correctly.
Reproduce [making a non-rated game rated (tested)]:
- Start a non-rated lobby game with late-observer-joins enabled
- Join the lobby with another account
- Join that running game
- The developer overlay can be opened for the host, but not for the rejoined client.
Reproduce [making a rated game non-rated (not tested)]:
- Join the lobby
- Join a rated game, let the game start
- Leave the game after it started
- Join a non-rated game that has not started yet and leave it
- Rejoin the rated game
- Should be able to open the dev overlay
Since the gamesetup part is skipped when rejoining, SetRankedGame
will never be set correctly.
See also #3547