Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update for 2024.1224.1 #271

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions packages/tosu/src/memory/lazer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {

// checks <game>k__BackingField
private checkIfPlayer(address: number) {
return this.process.readIntPtr(address + 0x400) === this.gameBase();
return this.process.readIntPtr(address + 0x3f8) === this.gameBase();
}

// Checks <api>k__BackingField and <StatisticsPanel>k__BackingField (to GameBase::<Storage>k__BackingField)
Expand Down Expand Up @@ -252,7 +252,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
if (!player) {
return 0;
}
return this.process.readIntPtr(player + 0x478);
return this.process.readIntPtr(player + 0x470);
}

private scoreInfo(player: number) {
Expand Down Expand Up @@ -765,7 +765,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {

const player = this.player();
if (player) {
const scoreProcessor = this.process.readIntPtr(player + 0x440);
const scoreProcessor = this.process.readIntPtr(player + 0x438);

const comboBindable = this.process.readIntPtr(
scoreProcessor + 0x250
Expand Down Expand Up @@ -962,7 +962,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
return this.readScore(
scoreInfo,
health * 200,
this.process.readInt(player + 0x38c)
this.process.readInt(player + 0x394)
);
}

Expand Down Expand Up @@ -1014,7 +1014,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
}

const player = this.player();
const hudOverlay = this.process.readIntPtr(player + 0x458);
const hudOverlay = this.process.readIntPtr(player + 0x450);

const inputController = this.process.readIntPtr(hudOverlay + 0x348);
const rulesetComponents = this.readComponents(
Expand Down Expand Up @@ -1134,7 +1134,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {

private hitEvents(): number[] {
const player = this.player();
const scoreProcessor = this.process.readIntPtr(player + 0x440);
const scoreProcessor = this.process.readIntPtr(player + 0x438);
const hitEventsList = this.process.readIntPtr(scoreProcessor + 0x288);
const hitEvents = this.readListItems(hitEventsList, true, 0x40);

Expand Down Expand Up @@ -1842,7 +1842,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
this.isPlayerLoading = isPlayerLoader;

if (isPlaying) {
const dependencies = this.process.readIntPtr(this.player() + 0x488);
const dependencies = this.process.readIntPtr(this.player() + 0x480);
const cache = this.process.readIntPtr(dependencies + 0x8);
const entries = this.process.readIntPtr(cache + 0x10);
const drawableRuleset = this.process.readIntPtr(entries + 0x10);
Expand Down Expand Up @@ -1913,14 +1913,14 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
folder: '',
creator: this.process.readSharpStringPtr(author + 0x18),
difficulty: difficultyName,
mapID: this.process.readInt(beatmap.info + 0xac),
mapID: this.process.readInt(beatmap.info + 0x8c),
setID: this.process.readInt(beatmap.setInfo + 0x30),
rankedStatus: Number(
this.lazerToStableStatus[
this.process.readInt(beatmap.info + 0xa8)
this.process.readInt(beatmap.info + 0x88)
]
),
objectCount: this.process.readInt(beatmap.info + 0xb4)
objectCount: this.process.readInt(beatmap.info + 0x94)
};
}

Expand Down
Loading