1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 01:43:15 +08:00

Fix a few new inspections in latest Rider EAP

This commit is contained in:
Dean Herbert 2019-04-01 11:39:02 +09:00
parent 79b5c2482b
commit 7d6a08d6da
5 changed files with 26 additions and 12 deletions

View File

@ -199,6 +199,7 @@ namespace osu.Game.Rulesets.Osu.Replays
// Wait until Auto could "see and react" to the next note.
double waitTime = h.StartTime - Math.Max(0.0, h.TimePreempt - reactionTime);
if (waitTime > lastFrame.Time)
{
lastFrame = new OsuReplayFrame(waitTime, lastFrame.Position) { Actions = lastFrame.Actions };
@ -292,7 +293,6 @@ namespace osu.Game.Rulesets.Osu.Replays
{
// We add intermediate frames for spinning / following a slider here.
case Spinner spinner:
{
Vector2 difference = startPosition - SPINNER_CENTRE;
float radius = difference.Length;
@ -315,9 +315,8 @@ namespace osu.Game.Rulesets.Osu.Replays
endFrame.Position = endPosition;
break;
}
case Slider slider:
{
for (double j = FrameDelay; j < slider.Duration; j += FrameDelay)
{
Vector2 pos = slider.StackedPositionAt(j / slider.Duration);
@ -326,7 +325,6 @@ namespace osu.Game.Rulesets.Osu.Replays
AddFrameToReplay(new OsuReplayFrame(slider.EndTime, new Vector2(slider.StackedEndPosition.X, slider.StackedEndPosition.Y), action));
break;
}
}
// We only want to let go of our button if we are at the end of the current replay. Otherwise something is still going on after us so we need to keep the button pressed!

View File

@ -0,0 +1,16 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Graphics.Sprites;
namespace osu.Game.Tests.Visual
{
public class TestCaseCharLookup : OsuTestCase
{
public TestCaseCharLookup()
{
AddStep("null", () => { });
AddStep("display acharacter", () => Add(new OsuSpriteText { Text = "振込申請" }));
}
}
}

View File

@ -88,6 +88,7 @@ namespace osu.Game.Scoring.Legacy
throw new IOException("input .lzma is too short");
long outSize = 0;
for (int i = 0; i < 8; i++)
{
int v = replayInStream.ReadByte();
@ -144,6 +145,7 @@ namespace osu.Game.Scoring.Legacy
score.Rank = ScoreRank.D;
break;
}
case 1:
{
int totalHits = count50 + count100 + count300 + countMiss;
@ -166,6 +168,7 @@ namespace osu.Game.Scoring.Legacy
score.Rank = ScoreRank.D;
break;
}
case 2:
{
int totalHits = count50 + count100 + count300 + countMiss + countKatu;
@ -185,6 +188,7 @@ namespace osu.Game.Scoring.Legacy
score.Rank = ScoreRank.D;
break;
}
case 3:
{
int totalHits = count50 + count100 + count300 + countMiss + countGeki + countKatu;

View File

@ -16,12 +16,11 @@ namespace osu.Game.Skinning
{
line = StripComments(line);
var pair = SplitKeyVal(line);
switch (section)
{
case Section.General:
{
var pair = SplitKeyVal(line);
switch (pair.Key)
{
case @"Name":
@ -36,11 +35,8 @@ namespace osu.Game.Skinning
}
break;
}
case Section.Fonts:
{
var pair = SplitKeyVal(line);
case Section.Fonts:
switch (pair.Key)
{
case "HitCirclePrefix":
@ -52,7 +48,6 @@ namespace osu.Game.Skinning
}
break;
}
}
base.ParseLine(skin, section, line);

View File

@ -230,6 +230,7 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_CONSTRAINS/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_LIST/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_BEFORE_BLOCK_STATEMENTS/@EntryValue">1</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_CODE/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64>