Skip to content

Commit

Permalink
fix: Incorrect offset for accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
cyperdark committed Dec 21, 2023
1 parent a57365e commit ef528ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/tosu/src/api/utils/buildResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export const buildResult = (
performancePoints: userProfile.performancePoints,
isOsu: userProfile.isOsu,
isConnected: userProfile.isConnected,
backgroundColour: userProfile.backgroundColour.toString(16)
backgroundColour: userProfile.backgroundColour?.toString(16)
},
tourney: buildTourneyData(instancesManager)
};
Expand Down
4 changes: 3 additions & 1 deletion packages/tosu/src/entities/GamePlayData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ export class GamePlayData extends AbstractEntity {
// [[Ruleset + 0x68] + 0x40] + 0x1C
this.PlayerHP = process.readDouble(hpBarBase + 0x1c);
// [[Ruleset + 0x68] + 0x48] + 0xC
this.Accuracy = process.readDouble(hpBarBase + 0xc);
this.Accuracy = process.readDouble(
process.readInt(gameplayBase + 0x48) + 0xc
);

if (this.MaxCombo > 0) {
const baseUR = this.calculateUR();
Expand Down

0 comments on commit ef528ab

Please sign in to comment.