File tree Expand file tree Collapse file tree
osu.Game.Rulesets.Osu/Mods Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
1+ // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
22// See the LICENCE file in the repository root for full licence text.
33
44using System ;
@@ -50,13 +50,20 @@ public void Update(Playfield playfield)
5050 // Very naive implementation of autopilot based on proximity to replay frames.
5151 // Special case for the first frame is required to ensure the mouse is in a sane position until the actual time of the first frame is hit.
5252 // TODO: this needs to be based on user interactions to better match stable (pausing until judgement is registered).
53- if ( currentFrame < 0 || Math . Abs ( replayFrames [ currentFrame + 1 ] . Time - time ) <= Math . Abs ( replayFrames [ currentFrame ] . Time - time ) )
53+ while ( currentFrame < replayFrames . Count - 1 )
5454 {
55- currentFrame ++ ;
56- new MousePositionAbsoluteInput { Position = playfield . ToScreenSpace ( replayFrames [ currentFrame ] . Position ) } . Apply ( inputManager . CurrentState , inputManager ) ;
55+ if ( currentFrame < 0 || Math . Abs ( replayFrames [ currentFrame + 1 ] . Time - time ) <= Math . Abs ( replayFrames [ currentFrame ] . Time - time ) )
56+ {
57+ currentFrame ++ ;
58+ }
59+ else
60+ {
61+ break ;
62+ }
5763 }
5864
59- // TODO: Implement the functionality to automatically spin spinners
65+ if ( currentFrame >= 0 )
66+ new MousePositionAbsoluteInput { Position = playfield . ToScreenSpace ( replayFrames [ currentFrame ] . Position ) } . Apply ( inputManager . CurrentState , inputManager ) ;
6067 }
6168
6269 public void ApplyToDrawableRuleset ( DrawableRuleset < OsuHitObject > drawableRuleset )
Original file line number Diff line number Diff line change 1010using Newtonsoft . Json ;
1111using osu . Framework . Allocation ;
1212using osu . Framework . Bindables ;
13+ using osu . Framework . Development ;
1314using osu . Framework . Extensions ;
1415using osu . Framework . Graphics ;
1516using osu . Framework . Logging ;
@@ -622,6 +623,8 @@ private void upgradeScoreRanks()
622623
623624 private void backpopulateMissingSubmissionAndRankDates ( )
624625 {
626+ if ( DebugUtils . IsNUnitRunning ) return ;
627+
625628 if ( ! localMetadataSource . Available )
626629 {
627630 Logger . Log ( "Cannot backpopulate missing submission/rank dates because the local metadata cache is missing." ) ;
@@ -725,6 +728,8 @@ protected virtual void backpopulateUserTags()
725728
726729 if ( ! localMetadataSource . Available || ! localMetadataSource . IsAtLeastVersion ( 3 ) )
727730 {
731+ if ( DebugUtils . IsNUnitRunning ) return ;
732+
728733 Logger . Log ( @"Local metadata cache has too low version to backpopulate user tags, attempting refetch..." ) ;
729734 localMetadataSource . FetchCache ( ) . WaitSafely ( ) ;
730735
You can’t perform that action at this time.
0 commit comments