Skip to content

Commit

Permalink
chore: fix gameplay data resets
Browse files Browse the repository at this point in the history
  • Loading branch information
cyperdark committed Jun 30, 2024
1 parent df7a0aa commit a9a4e0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/tosu/src/entities/TourneyUserProfileData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class TourneyUserProfileData extends AbstractEntity {
wLogger.debug('TUPD(updateState) Slot is not equiped');

this.resetState();
gamePlayData.init();
gamePlayData.init(undefined, 'tourney');
return;
}

Expand Down
8 changes: 4 additions & 4 deletions packages/tosu/src/objects/instanceManager/osuInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export class OsuInstance {
case 5:
// Reset Gameplay/ResultScreen data on joining to songSelect
if (!gamePlayData.isDefaultState) {
gamePlayData.init();
gamePlayData.init(undefined, '4,5');
resultsScreenData.init();
beatmapPpData.resetCurrentAttributes();
}
Expand All @@ -316,8 +316,8 @@ export class OsuInstance {
this.previousTime = allTimesData.PlayTime;

if (
allTimesData.PlayTime < 0 &&
!gamePlayData.isDefaultState
allTimesData.PlayTime <
Math.min(50, beatmapPpData.timings.firstObj)
) {
gamePlayData.init(true, 'not-default');
break;
Expand All @@ -338,7 +338,7 @@ export class OsuInstance {
break;

default:
gamePlayData.init();
gamePlayData.init(undefined, 'default');
resultsScreenData.init();
break;
}
Expand Down

0 comments on commit a9a4e0c

Please sign in to comment.