Skip to content

Commit

Permalink
Fix ruleset errors
Browse files Browse the repository at this point in the history
  • Loading branch information
EVAST9919 committed Feb 3, 2022
1 parent 37646e4 commit 2956fbc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Swing.Tests/VisualTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class VisualTestRunner
[STAThread]
public static int Main(string[] args)
{
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true))
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu"))
{
host.Run(new OsuTestBrowser());
return 0;
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Swing/Beatmaps/SwingBeatmapConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected override IEnumerable<SwingHitObject> ConvertHitObject(HitObject obj, I

case IHasDuration endTimeData:
{
double hitMultiplier = IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.BaseDifficulty.OverallDifficulty, 3, 5, 7.5) * spinner_hit_multiplier;
double hitMultiplier = IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.Difficulty.OverallDifficulty, 3, 5, 7.5) * spinner_hit_multiplier;

return new List<SwingHitObject>
{
Expand Down
8 changes: 4 additions & 4 deletions osu.Game.Rulesets.Swing/UI/DrawableSwingRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ private static List<BarLine> generate(IBeatmap beatmap)
if (timingPoints.Count == 0)
return bars;

var timePreempt = (float)IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.BaseDifficulty.ApproachRate, 1800, 1200, 450);
var timePreempt = (float)IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.Difficulty.ApproachRate, 1800, 1200, 450);

for (int i = 0; i < timingPoints.Count; i++)
{
var currentTimingPoint = timingPoints[i];
int currentBeat = 0;

// Stop on the beat before the next timing point, or if there is no next timing point stop slightly past the last object
double endTime = i < timingPoints.Count - 1 ? timingPoints[i + 1].Time - currentTimingPoint.BeatLength : lastHitTime + currentTimingPoint.BeatLength * (int)currentTimingPoint.TimeSignature;
double endTime = i < timingPoints.Count - 1 ? timingPoints[i + 1].Time - currentTimingPoint.BeatLength : lastHitTime + currentTimingPoint.BeatLength * currentTimingPoint.TimeSignature.Numerator;

double barLength = currentTimingPoint.BeatLength * (int)currentTimingPoint.TimeSignature;
double barLength = currentTimingPoint.BeatLength * currentTimingPoint.TimeSignature.Numerator;

for (double t = currentTimingPoint.Time; Precision.DefinitelyBigger(endTime, t); t += barLength, currentBeat++)
{
Expand All @@ -111,7 +111,7 @@ private static List<BarLine> generate(IBeatmap beatmap)
t = roundedTime;
}

bool major = currentBeat % (int)currentTimingPoint.TimeSignature == 0;
bool major = currentBeat % currentTimingPoint.TimeSignature.Numerator == 0;

bars.AddRange(new[]
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Swing/osu.Game.Rulesets.Swing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<EmbeddedResource Include="Resources\**\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2022.108.0" />
<PackageReference Include="ppy.osu.Game" Version="2022.128.0" />
</ItemGroup>
</Project>

0 comments on commit 2956fbc

Please sign in to comment.