Skip to content

v0.6.11

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Jun 22:30

RockSniffer_PJ v0.6.11 Release Notes

Hotfix release on top of v0.6.10. No C# changes; addon JavaScript and shared _deps/playthrough-tracker.js only.

Bug fixed

Mode-1 (results) "X% worse than previous best" reports a bogus value

In v0.6.10, the addons' onSongEnded captures app.snapshotFinal = tracker.getFinal() into Vue data so the comparison view survives the tracker's reset on next-song's onSongChanged. But addon.onSongEnded runs before tracker.onSongEnded in _doOnSongEnded's callback order, so at snapshot time the tracker's currentAttempt.sections[last] is still the constructor's {} placeholder — update() only finalizes a section when the user crosses into the next one, and the song's final section never has a next.

Sequence:

  1. tracker.getFinal() reads sections[last].Accuracy → undefined (placeholder) → ternary defaults to 0
  2. RelativeAccuracy = 0 - previousBest.sections[last].Accuracy = -previousBest.lastSection.Accuracy
  3. Mode-1 HTML displays Math.abs(RelativeAccuracy)% worse than previous best

The message reports the user's previous best accuracy as a negative delta. When a user re-plays a song at their previous skill level, the bug produces output like "80.4% worse than previous best" alongside a live "Notes: 80.4%" stat — the two numbers visually match because the user tied their record, not because the system is reporting current accuracy.

Fix

Two changes:

addons/_deps/playthrough-tracker.js — PlaythroughBySection.finalize() is now idempotent. After first call, currentSection is undefined; subsequent calls return immediately. This makes it safe for addons to call finalize() early without disrupting the tracker's own later call.

Each mode-1 addon's onSongEnded — calls tracker.currentAttempt.finalize(poller.getCurrentReadout()) immediately before the snapshot capture. This ensures sections[last].Accuracy is correctly populated from the SONG_ENDING readout's noteData before tracker.getFinal() reads it.

poller.getCurrentReadout() returns _prevdata.memoryReadout — the previous poll's data, which is the SONG_ENDING-state readout containing the final accumulated noteData. This is the same source the tracker itself uses for its own finalize call.

Applied to 9 addons total:

  • 5 in the main repo: current_song_v2, current_song_v3, current_song_v3.1_LaS, Arcade_v1_LaS, Arcade_v1_SA
  • 4 in the PJ addons set: PoizenJam MINIMALIST, PoizenJam MINIMALIST V2, PoizenJam RETROWAVE, PoizenJam SYNTHWAVE

Files changed

  • addons/_deps/playthrough-tracker.js — idempotent finalize() guard
  • addons/current_song_v2/script.js — early finalize() call in onSongEnded
  • addons/current_song_v3/script.js — same
  • addons/current_song_v3.1_LaS/script.js — same (byte-identical to v3)
  • addons/Arcade_v1_LaS/script.js — same
  • addons/Arcade_v1_SA/script.js — same
  • RockSniffer/Program.cs — version bump 0.6.10 → 0.6.11

Separate PJ addons set updated correspondingly.

No submodule changes. JS-only (the version-constant change is the only C# touch).