This is the counterpart to
https://github.com/ppy/osu-server-spectator/pull/413. The goal is to
log the value which is seemingly failing to work correctly client-side
as well.
The reason for doing that is two-fold:
- To eliminate possibility of freakazoid issues wherein some computers
miscalculate the version hash somehow
- To eliminate possibility of the version hash somehow getting lost in
transit (e.g. present client-side but no longer present server-side).
* Fix play button starting wrong beatmap before selection loads
When clicking the osu! cookie (play button) before a newly selected beatmap finishes loading, the previous beatmap would be played instead of the currently selected one.
This was caused by the cookie reading from the global beatmap state which is debounced by 150ms, while the Enter key correctly used the carousel's current selection.
The fix makes the cookie use the same beatmap source as Enter - the carousel's current selection - which is always up-to-date regardless of debounce timing.
Closes#36074
* Use ensureGlobalBeatmapValid() for logo and Enter key actions
* Add test for beatmap selection timing bug
Tests the fix for issue #36074 where clicking the play button immediately after selecting a different difficulty would start the wrong beatmap due to the 150ms selection debounce.
Previously, there if two consecutive hitobjects were 50ms apart both mechanisms to make sure that the input buttons are alternated would fail.
This produced a replay frame which lifts the current button, followed by a frame which presses the same button again, at the same time as it was lifted.
The key-up frame would always get skipped without frame-stability, leading to hitsounds and hit animations not getting played in the editor.