1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 00:27:25 +08:00
Commit Graph

1066 Commits

Author SHA1 Message Date
Bartłomiej Dach
86a8ab6db6
Fix quick retry immediately after completion marking score as failed
Closes https://github.com/ppy/osu/issues/25247.

The scenario involved here is as follows:

1. User completes beatmap by hitting all notes.
2. `checkScoreCompleted()` determines completion, and calls
   `progressToResults(withDelay: true)`.
3. `progressToResults()` schedules `resultsDisplayDelegate`, which
   includes a call to `prepareAndImportScoreAsync()`, a second in the
   future.
4. User presses quick retry hotkey.
   This calls `Player.Restart(quickRestart: true)`,
   which invokes `Player.RestartRequested`,
   which in turn calls `PlayerLoader.restartRequested(true)`,
   which in turn causes `PlayerLoader` to make itself current,
   which means that `Player.OnExiting()` will get called.
5. `Player.OnExiting()` sees that `prepareScoreForDisplayTask` is null
   (because `prepareAndImportScoreAsync()` - which sets it -
   is scheduled to happen in the future), and as such assumes that
   the score did not complete. Thus, it marks the score as failed.
6. `Player.Restart()` after invoking `RestartRequested` calls
   `PerformExit(false)`, which then will unconditionally call
   `prepareAndImportScoreAsync()`. But the score has already been marked
   as failed.

The flow above can be described as "convoluted", but I'm not sure I have
it in me right now to try and refactor it again. Therefore, to fix,
switch the `prepareScoreForDisplayTask` null check in
`Player.OnExiting()` to check `GameplayState.HasPassed` instead, as it
is not susceptible to the same out-of-order read issue.
2023-10-27 12:17:03 +02:00
Dean Herbert
fa47309eef
Fix exit key during storyboard outro not progressing to results 2023-10-12 19:31:54 +09:00
Dean Herbert
d174a6ce61
Remove dead code which was only there for the exit-specific scenario 2023-10-12 19:27:35 +09:00
Dean Herbert
32eda99c3a
Add missing xmldoc returns 2023-10-12 19:06:34 +09:00
Dean Herbert
242a41371c
Fix HotkeyOverlay fade out occurring when exit is blocked 2023-10-12 15:42:54 +09:00
Dean Herbert
7c0d496730
Show results immediately if user hits "back" key after finishing gameplay
I've gone ahead and matched the osu!stable behaviour for this, as it
seems like it's what people are used to and they will settle for no
less.

Closes https://github.com/ppy/osu/issues/18089.
2023-10-12 15:42:23 +09:00
Dean Herbert
eee7dc02da
Reduce severity of clock running check to avoid production crashes 2023-10-10 17:58:11 +09:00
Dean Herbert
e5207167c8
Rename FailAnimation to FailAnimationContainer 2023-10-08 00:39:30 +09:00
Dean Herbert
541cd972e1 Rename ArchiveReader implementations to read better 2023-09-14 13:36:07 +09:00
Dean Herbert
e8bde6504a Fix score being cloned in async method causing random crashes
Closes https://github.com/ppy/osu/issues/24445.
2023-08-15 16:08:13 +09:00
Dean Herbert
a618ed140e Move StoryboardReplacesBackground bindable more local to usage 2023-08-02 15:29:18 +09:00
Bartłomiej Dach
e208f38bcb
Merge pull request #24361 from peppy/fix-editor-global-music-hotkey-conflicts
Disallow interacting with the global track state in `Player` and `Editor`
2023-07-30 12:28:53 +02:00
Dean Herbert
945d89e955 Move disables to loading screens for better coverage of edge cases 2023-07-30 13:45:42 +09:00
Dean Herbert
4889864478 Fix files references not correctly being copied after replay import in Player 2023-07-26 15:22:00 +09:00
Dean Herbert
3485b72eaa Disallow interacting with the global track state in Player and Editor 2023-07-25 20:20:53 +09:00
Dean Herbert
157b1f301b Rename AllowTrackAdjustments to more understandable ApplyModTrackAdjustments 2023-07-25 20:20:53 +09:00
Dean Herbert
67746e1369 Move retry sample playback to PlayerLoader 2023-07-07 15:36:17 +09:00
Dean Herbert
170bc5bfce Add support for skinnable "retry" sound 2023-07-06 12:25:15 +09:00
Bartłomiej Dach
af66ccbfdf
Merge branch 'master' into hud/kc-skinnable 2023-06-27 20:35:47 +02:00
timiimit
e1cbcabe0b
Fix skip not always triggering in multiplayer 2023-06-26 21:26:41 +02:00
Bartłomiej Dach
8d91580dc1
Rename {KeyCounter -> InputCount}Controller 2023-06-26 19:27:42 +02:00
tsrk
c637fddf73
refactor: decouple Trigger logic from KeyCounterDisplay
This allows to keep a coeherent state regardless of the progress of the play
2023-06-14 21:13:35 +02:00
Dan Balasescu
510b8e4c78 Remove ScoreManager.Mode, handle per-use 2023-05-18 20:08:49 +09:00
Bartłomiej Dach
432f698697
Merge branch 'master' into gameplay/key-counter-abstraction 2023-04-05 19:45:14 +02:00
Bartłomiej Dach
8cc425774b
Merge branch 'master' into fix-replay-fail-on-exit 2023-04-03 21:23:23 +02:00
Dean Herbert
b0c09df259 Merge branch 'master' into gameplay/key-counter-abstraction 2023-04-03 15:33:35 +09:00
Dean Herbert
796cd9c916 Rewrite comment explaining early return on checkScoreCompleted given new usages 2023-03-31 02:36:17 +09:00
Dean Herbert
b25a59fd14 Rename scoreCompleted -> checkScoreCompleted to reflect the fact it doesn't always succeed 2023-03-31 02:30:04 +09:00
Dean Herbert
4dd0c2c7a5 Add assert ensuring we don't ever get to the results screen with an F rank
Intentionally an assertion as I want tests to fail, but I don't want
this to cause crashes for an end user if it does happen to occur.
2023-03-29 14:11:58 +09:00
Dean Herbert
a8bb2e33ac Ensure all preconditions are checked before progressing to results screen after storyboard ends 2023-03-29 14:00:11 +09:00
Cootz
556964eae0
Merge branch 'master' into BitmapUpdatesOnScore 2023-03-16 12:16:42 +03:00
Dean Herbert
3b62f87b64 Ensure Player does not fail a score on exit if a replay is currently loaded 2023-03-16 17:14:20 +09:00
tsrk
1beec71037
refactor(KeyCounterDisplay): apply suggestions
I also took the freedom to add type checking, as we can't limit the
usage of `Add()` since it's a Container. The exception thrown also
advises of using the suggested `AddTrigger()` instead.
2023-02-22 14:58:27 +00:00
Dean Herbert
7aaaf7fca2 Combine and attempt to simplify the score import / preparation process further 2023-02-14 16:55:35 +09:00
Dean Herbert
8a206234f7 Merge branch 'master' into replay-length-extension 2023-02-14 16:42:26 +09:00
PC
7e127dafe2 Update reference 2023-02-07 11:52:47 +03:00
Cootz
2c7386db39 FIx score appearing on BeatmapLeaderboard and TopLocalRank 2023-02-06 15:14:14 +03:00
Dean Herbert
aaf3ad805c Fix potential nullref in tests 2023-02-06 19:31:45 +09:00
Dean Herbert
b83c8443ea Ensure pause sample loop is stopped on exiting player 2023-02-06 18:24:31 +09:00
Terochi
43f7665c9e Improved readability again 2023-02-06 09:49:42 +01:00
Terochi
4f23e096d7 Improved readability 2023-02-06 07:59:37 +01:00
Terochi
f58534f60c Extended the length of replay at the end of map 2023-02-05 18:51:28 +01:00
Dean Herbert
edecd2ee25 Merge branch 'master' into middle-click-replay-pause 2023-02-02 15:25:51 +09:00
Bartłomiej Dach
06aa3f7798
Rename Stop{SampleAndRemoveFilters -> }()
Now that just one method for stopping samples is left, let's just
repurpose st as the general "stop global effects" method rather than
have it there with a hyperspecific name. It also has good symmetry, as
there already was a `Start()` method in the class.
2023-01-22 09:29:22 +01:00
Bartłomiej Dach
0edfd24410
Remove unnecessary sample stop in Restart()
It is unnecessary, as a successful restart will exit the current player
screen, and `OnExiting()` has another `StopSampleAndRemoveFilters()`
call, which means that in the restart flow the sample was actually
getting stopped twice.

Standard exit flow is fine, it only stopped the sample once.
2023-01-22 09:24:12 +01:00
Matheus Filipe dos Santos Reinert
5b1a23c697 Replace RemoveFilters call with StopSampleAndRemoveFilters 2023-01-22 01:44:16 -03:00
Matheus Filipe dos Santos Reinert
a746cbc6ed Fix failSample still playing after player left FailOverlay 2023-01-22 01:14:33 -03:00
Dean Herbert
04705504c5 Move cache to more appropriate location 2023-01-18 17:19:57 +09:00
Dean Herbert
7d0388c55c Cache IFrameStableClock in Player for easier access
Allows directly referencing rather than going through `DrawableRuleset`.
Helps with testing and implementation of the new song progress display
(#22144).
2023-01-18 16:31:58 +09:00
Joseph Madamba
d79ee29f29 Make replays pause with middle mouse button instead of exiting 2023-01-01 21:01:12 -08:00