Cleanup code

This commit is contained in:
Liam 2022-10-30 14:45:25 +00:00
parent b633e0b59b
commit f998291b2e

View File

@ -6,6 +6,7 @@ import { useSongDataStore } from "../store/songDataStore";
import { getMapHashFromLevelId } from "./map/mapHelpers";
const ip = useSettingsStore.getState().socketAddr || "localhost";
const updatePlayerData = usePlayerDataStore.getState().updatePlayerData;
let cutData: any = [];
cutData.saberA = {
@ -17,8 +18,6 @@ cutData.saberB = {
totalScore: [0, 0, 0],
};
const updatePlayerData = usePlayerDataStore.getState().updatePlayerData;
export function connectClient(attempt: number = 1) {
const client = new W3CWebSocket(`ws://${ip}:6557/socket`);
const retryTime = 30_000 * attempt > 60_000 ? 60_000 : 30_000 * attempt;
@ -85,7 +84,6 @@ const handlers: any = {
state.setCurrentScore(finalScore);
state.setPercent(percent);
state.setPp(percent);
state.updateMapData(
getMapHashFromLevelId(levelId),
difficultyEnum,