Skip to content

Commit

Permalink
fix: Fix wrong offset if negative.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardscull committed Sep 11, 2023
1 parent e3c18cc commit bb7cd45
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/merge/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ export default async function main(
`./${MergedSong.metadata.title}.osz`
);

// NOTE: Doesn't work. Need to find another way to do it
// Deny modify permissions for .osz file (to prevent osu! from deleting it)
// fs.chmodSync(`./${MergedSong.metadata.title}.osz`, 0o444);

// Delete Temp folder
fs.rmSync("./Temp", { recursive: true });

Expand Down Expand Up @@ -165,7 +161,8 @@ export default async function main(

const mapsOffset =
lastTimingPoint.startTime < 0
? timeForFullRythmCycle - lastTimingPoint.startTime
? timeForFullRythmCycle +
(timeForFullRythmCycle + lastTimingPoint.startTime)
: lastTimingPoint.startTime;

let newOffset = mergeOffset + mapsOffset;
Expand Down

0 comments on commit bb7cd45

Please sign in to comment.