fix funny spam
This commit is contained in:
parent
e1d942fb1b
commit
bd05c17a85
@ -186,25 +186,23 @@ export const useSongDataStore = create<SongDataState>()((set) => ({
|
|||||||
|
|
||||||
setPp: (percent: number) => {
|
setPp: (percent: number) => {
|
||||||
const leaderboardData = useSongDataStore.getState().mapLeaderboardData;
|
const leaderboardData = useSongDataStore.getState().mapLeaderboardData;
|
||||||
if (
|
// if (
|
||||||
leaderboardData.beatleader.stars == undefined ||
|
// leaderboardData.beatleader.stars == undefined ||
|
||||||
leaderboardData.scoresaber.stars == undefined
|
// leaderboardData.scoresaber.stars == undefined
|
||||||
) {
|
// ) {
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
useSongDataStore.getState().setPp(percent);
|
// useSongDataStore.getState().setPp(percent);
|
||||||
}, 100);
|
// }, 100);
|
||||||
}
|
// }
|
||||||
|
|
||||||
const scoreSaberMapStarCount =
|
const scoreSaberMapStarCount = leaderboardData.scoresaber.stars;
|
||||||
useSongDataStore.getState().mapLeaderboardData.scoresaber.stars;
|
|
||||||
let scoreSaberPP = Utils.calculatePP(
|
let scoreSaberPP = Utils.calculatePP(
|
||||||
scoreSaberMapStarCount,
|
scoreSaberMapStarCount,
|
||||||
percent,
|
percent,
|
||||||
"ScoreSaber"
|
"ScoreSaber"
|
||||||
);
|
);
|
||||||
|
|
||||||
const beatLeaderMapStarCount =
|
const beatLeaderMapStarCount = leaderboardData.beatleader.stars;
|
||||||
useSongDataStore.getState().mapLeaderboardData.beatleader.stars;
|
|
||||||
let beatLeaderPP = Utils.calculatePP(
|
let beatLeaderPP = Utils.calculatePP(
|
||||||
beatLeaderMapStarCount,
|
beatLeaderMapStarCount,
|
||||||
percent,
|
percent,
|
||||||
|
Reference in New Issue
Block a user