Skip to content

Commit

Permalink
Calculate rank per type
Browse files Browse the repository at this point in the history
  • Loading branch information
1zc committed Mar 11, 2024
1 parent b9fe9d7 commit b4948b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ST-Player/PlayerStats/PlayerStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void LoadMapTimesData(Player player, TimerDatabase DB, int playerId = 0,
Task<MySqlDataReader> dbTask2 = DB.Query($@"
SELECT mainquery.*, (SELECT COUNT(*) FROM `MapTimes` AS subquery
WHERE subquery.`map_id` = mainquery.`map_id` AND subquery.`style` = mainquery.`style`
AND subquery.`run_time` <= mainquery.`run_time`) AS `rank` FROM `MapTimes` AS mainquery
AND subquery.`run_time` <= mainquery.`run_time` AND subquery.`type` = mainquery.`type`) AS `rank` FROM `MapTimes` AS mainquery
WHERE mainquery.`player_id` = {player.Profile.ID} AND mainquery.`map_id` = {player.CurrMap.ID};
");
MySqlDataReader playerStats = dbTask2.Result;
Expand Down

0 comments on commit b4948b3

Please sign in to comment.