This commit is contained in:
parent
54bdf532fe
commit
64b6ef1a7f
@ -200,8 +200,8 @@ public class ScoreService {
|
|||||||
String[] modifiers = !score.getModifiers().isEmpty() ? score.getModifiers().split(",") : new String[0];
|
String[] modifiers = !score.getModifiers().isEmpty() ? score.getModifiers().split(",") : new String[0];
|
||||||
|
|
||||||
DeviceHeadset deviceHmd;
|
DeviceHeadset deviceHmd;
|
||||||
boolean legacyDeviceInformation = score.getDeviceHmd() == null && score.getHmd() != 0;
|
boolean useLegacyHmdIdentification = score.getDeviceHmd() == null && score.getHmd() != 0;
|
||||||
if (!legacyDeviceInformation) { // Use the new format
|
if (!useLegacyHmdIdentification) { // Use the new format
|
||||||
deviceHmd = DeviceHeadset.getByName(score.getDeviceHmd());
|
deviceHmd = DeviceHeadset.getByName(score.getDeviceHmd());
|
||||||
} else { // Use the legacy format (only includes the HMD, missing controller information)
|
} else { // Use the legacy format (only includes the HMD, missing controller information)
|
||||||
deviceHmd = DeviceHeadset.getByFallbackValue(score.getHmd());
|
deviceHmd = DeviceHeadset.getByFallbackValue(score.getHmd());
|
||||||
@ -232,8 +232,10 @@ public class ScoreService {
|
|||||||
);
|
);
|
||||||
this.saveScore(user, scoreSaberScore);
|
this.saveScore(user, scoreSaberScore);
|
||||||
this.logScore(Platform.Platforms.SCORESABER, Leaderboard.getFromScoreSaberToken(leaderboard), scoreSaberScore, user);
|
this.logScore(Platform.Platforms.SCORESABER, Leaderboard.getFromScoreSaberToken(leaderboard), scoreSaberScore, user);
|
||||||
|
if (useLegacyHmdIdentification) {
|
||||||
log.info(" - Using legacy device information, headset found: {} (missing controller information)", deviceHmd);
|
log.info(" - Using legacy device information, headset found: {} (missing controller information)", deviceHmd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the previous scores for a leaderboard.
|
* Gets the previous scores for a leaderboard.
|
||||||
|
Reference in New Issue
Block a user