Skip to content

Commit

Permalink
ujifgvs
Browse files Browse the repository at this point in the history
  • Loading branch information
Snirozu committed Nov 23, 2024
1 parent 0070b18 commit 5054b06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions source/states/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -992,16 +992,16 @@ class FreeplayState extends MusicBeatState
ratingFC = 'SDCB';

var fpRating = '';
if (top[i].playbackRate != 0) {
if (top[i].playbackRate > 1)
if (top[i].playbackRate != 0.0) {
if (top[i].playbackRate > 1.0)
fpRating = "+";
else if (top[i].playbackRate < 1)
else if (top[i].playbackRate < 1.0)
fpRating = "-";
}

topShit.setRow(i, [
(i + 1 + curPage * 15) + ". " + top[i].player,
FlxStringUtil.formatMoney(top[i].score, false) + " - " + top[i].points + "FP" + (top[i].playbackRate != 1 ? "+" : ''),
FlxStringUtil.formatMoney(top[i].score, false) + " - " + top[i].points + "FP" + fpRating,
top[i].accuracy + "% - " + ratingFC
], coolColor);
}
Expand Down
10 changes: 8 additions & 2 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ class PlayState extends MusicBeatState
public var songShits:Int = 0;
public var songPoints:Float = 0;

public var pointsPercent:Float = 0;

public var scoreTxt:FlxText;
public var scoreTxtP1:FlxText;
public var scoreTxtP2:FlxText;
Expand Down Expand Up @@ -1754,13 +1756,17 @@ class PlayState extends MusicBeatState
var points = online.FunkinPoints.calcFP(ratingPercent, songMisses, songDensity, totalNotesHit, maxCombo);
if (points != songPoints) {
songPoints = points;
if (totalPlayed != 0) {
var maxPoints = online.FunkinPoints.calcFP(1, 0, songDensity, totalPlayed, totalPlayed);
pointsPercent = Math.min(1, Math.max(0, points / maxPoints));
}
resetRPC(true);
}
songPoints = points;

if (skipRest) {
if (ClientPrefs.data.showFP)
scoreTextObject.text += ' | FP: ' + songPoints;
scoreTextObject.text += ' | FP: ' + songPoints + ' (${CoolUtil.floorDecimal(pointsPercent * 100, 1)}%)';
return;
}

Expand All @@ -1784,7 +1790,7 @@ class PlayState extends MusicBeatState
}
callOnScripts('onUpdateScore', [miss]);
if (ClientPrefs.data.showFP)
scoreTextObject.text += ' | FP: ' + songPoints;
scoreTextObject.text += ' | FP: ' + songPoints + ' (${CoolUtil.floorDecimal(pointsPercent * 100, 1)}%)';
}

public function setSongTime(time:Float)
Expand Down

0 comments on commit 5054b06

Please sign in to comment.