Duplicate "scoreboardpos" submissions for playerstats.
Summary:
XonStat is receiving duplicate scoreboardpos values, making games show up twice in the "recent games" list if the duplicate scores happen to be the best scores in the given game.
Example:
TDM game #453886, which can be found at http://stats.xonotic.org/game/453886. Note the scores of Mirio and Diomedes. On the recent games page you can see this game twice here: http://stats.xonotic.org/games?start_game_id=453896.
In the database the following values are present:
xonstatdb=> select player_id, rank, scoreboardpos from player_game_stats where game_id = 453886 order by scoreboardpos;
player_id | rank | scoreboardpos -----------+------+--------------- 21 | 1 | 1 11878 | 1 | 1 8848 | 3 | 3 10794 | 5 | 4 3106 | 4 | 5 3270 | 6 | 6 130 | 7 | 7 22 | 8 | 8 (8 rows)
Background info:
The playerstats submission handler sends XonStat two fields for each player: the rank and their scoreboard position ("scoreboardpos"). The rank field indicates the rank of the player based on their overall score. The scoreboard position field indicates the position of the player on the actual scoreboard. Since two players may end up with the same scores, they can have the same rank, but the game will display them in different rows on the scoreboard. The scoreboard position should never be duplicated.