From 64b6ef1a7fefa0d0e92585a9b19204ab4dd8e472 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 5 Aug 2024 05:59:41 +0100 Subject: [PATCH] api: oopsie doodle --- .../main/java/cc/fascinated/services/ScoreService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/API/src/main/java/cc/fascinated/services/ScoreService.java b/API/src/main/java/cc/fascinated/services/ScoreService.java index b7fd850..60ffa27 100644 --- a/API/src/main/java/cc/fascinated/services/ScoreService.java +++ b/API/src/main/java/cc/fascinated/services/ScoreService.java @@ -200,8 +200,8 @@ public class ScoreService { String[] modifiers = !score.getModifiers().isEmpty() ? score.getModifiers().split(",") : new String[0]; DeviceHeadset deviceHmd; - boolean legacyDeviceInformation = score.getDeviceHmd() == null && score.getHmd() != 0; - if (!legacyDeviceInformation) { // Use the new format + boolean useLegacyHmdIdentification = score.getDeviceHmd() == null && score.getHmd() != 0; + if (!useLegacyHmdIdentification) { // Use the new format deviceHmd = DeviceHeadset.getByName(score.getDeviceHmd()); } else { // Use the legacy format (only includes the HMD, missing controller information) deviceHmd = DeviceHeadset.getByFallbackValue(score.getHmd()); @@ -232,7 +232,9 @@ public class ScoreService { ); this.saveScore(user, scoreSaberScore); this.logScore(Platform.Platforms.SCORESABER, Leaderboard.getFromScoreSaberToken(leaderboard), scoreSaberScore, user); - log.info(" - Using legacy device information, headset found: {} (missing controller information)", deviceHmd); + if (useLegacyHmdIdentification) { + log.info(" - Using legacy device information, headset found: {} (missing controller information)", deviceHmd); + } } /**