From b5abe7738dab69d20f8aaa6bb6864e6052bcaba6 Mon Sep 17 00:00:00 2001 From: jvyden Date: Sun, 14 Aug 2022 19:08:43 -0400 Subject: [PATCH] Order scores by id then by points Closes #418 --- .../Controllers/Slots/ScoreController.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs index 5a1c22df..02f2a73b 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs @@ -123,8 +123,10 @@ public class ScoreController : ControllerBase // This is hella ugly but it technically assigns the proper rank to a score // var needed for Anonymous type returned from SELECT - var rankedScores = this.database.Scores.Where(s => s.SlotId == slotId && s.Type == type) - .OrderByDescending(s => s.Points) + var rankedScores = this.database.Scores + .Where(s => s.SlotId == slotId && s.Type == type) + .OrderBy(s => s.ScoreId) + .ThenByDescending(s => s.Points) .ToList() .Select (