diff --git a/src/helpers/websocketClient.ts b/src/helpers/websocketClient.ts index a0422bd..263f7e6 100644 --- a/src/helpers/websocketClient.ts +++ b/src/helpers/websocketClient.ts @@ -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,