maybe fix pp
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 36s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 36s
This commit is contained in:
parent
e7ea152bf9
commit
6b11a608bd
@ -119,9 +119,9 @@ public class ScoreSaberPlatform extends Platform {
|
|||||||
public double getModifier(int curveVersion, double accuracy) {
|
public double getModifier(int curveVersion, double accuracy) {
|
||||||
accuracy = MathUtils.clamp(accuracy, 0, 100) / 100;
|
accuracy = MathUtils.clamp(accuracy, 0, 100) / 100;
|
||||||
|
|
||||||
CurvePoint prev = this.getCurvePoints().get(curveVersion)[0];
|
CurvePoint prev = this.getCurvePoints().get(curveVersion)[1];
|
||||||
for (CurvePoint point : this.getCurvePoints().get(curveVersion)) {
|
for (CurvePoint point : this.getCurvePoints().get(curveVersion)) {
|
||||||
if (point.getX() >= accuracy) {
|
if (point.getX() <= accuracy) {
|
||||||
double distance = (prev.getX() - accuracy) / (prev.getX() - point.getX());
|
double distance = (prev.getX() - accuracy) / (prev.getX() - point.getX());
|
||||||
return MathUtils.lerp(prev.getY(), point.getY(), distance);
|
return MathUtils.lerp(prev.getY(), point.getY(), distance);
|
||||||
}
|
}
|
||||||
@ -200,7 +200,9 @@ public class ScoreSaberPlatform extends Platform {
|
|||||||
if (!score.getLeaderboardId().equals(id)) { // Check if the leaderboard ID matches
|
if (!score.getLeaderboardId().equals(id)) { // Check if the leaderboard ID matches
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
double oldPp = score.getPp();
|
||||||
double pp = this.getPp(this.getCurrentCurveVersion(), leaderboard.getStars(), score.getAccuracy());
|
double pp = this.getPp(this.getCurrentCurveVersion(), leaderboard.getStars(), score.getAccuracy());
|
||||||
|
log.info("Leaderboard: {}, Old PP: {}, New PP: {}", leaderboard.getSongName(), oldPp, pp);
|
||||||
return pp != score.getPp(); // Check if the pp has changed
|
return pp != score.getPp(); // Check if the pp has changed
|
||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user