Skip to content

Commit

Permalink
Merge pull request #1388 from andy840119/update-nuget-package
Browse files Browse the repository at this point in the history
Update nuget package.
  • Loading branch information
andy840119 authored Jun 15, 2022
2 parents c0e4761 + 5630005 commit 06d9970
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ protected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(I
// todo : might have a sort.
// LegacySortHelper<HitObject>.Sort(sortedObjects, Comparer<HitObject>.Create((a, b) => (int)Math.Round(a.StartTime) - (int)Math.Round(b.StartTime)));

List<DifficultyHitObject> objects = new List<DifficultyHitObject>();

for (int i = 1; i < sortedObjects.Length; i++)
yield return new KaraokeDifficultyHitObject(sortedObjects[i], sortedObjects[i - 1], clockRate);
objects.Add(new KaraokeDifficultyHitObject(sortedObjects[i], sortedObjects[i - 1], clockRate, objects, objects.Count));

return objects;
}

// Sorting is done in CreateDifficultyHitObjects, since the full list of hitobjects is required.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

using System.Collections.Generic;
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Karaoke.Objects;
using osu.Game.Rulesets.Objects;
Expand All @@ -11,8 +12,8 @@ public class KaraokeDifficultyHitObject : DifficultyHitObject
{
public new Note BaseObject => (Note)base.BaseObject;

public KaraokeDifficultyHitObject(HitObject hitObject, HitObject lastObject, double clockRate)
: base(hitObject, lastObject, clockRate)
public KaraokeDifficultyHitObject(HitObject hitObject, HitObject lastObject, double clockRate, List<DifficultyHitObject> objects, int index)
: base(hitObject, lastObject, clockRate, objects, index)
{
}
}
Expand Down
6 changes: 3 additions & 3 deletions osu.Game.Rulesets.Karaoke/Difficulty/Skills/Strain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ protected override double StrainValueOf(DifficultyHitObject current)
static int getColumnIndex(Tone tone) => 0;
}

protected override double CalculateInitialStrain(double time)
=> applyDecay(individualStrain, time - Previous[0].StartTime, individual_decay_base)
+ applyDecay(overallStrain, time - Previous[0].StartTime, overall_decay_base);
protected override double CalculateInitialStrain(double offset, DifficultyHitObject current)
=> applyDecay(individualStrain, offset - current.Previous(0).StartTime, individual_decay_base)
+ applyDecay(overallStrain, offset - current.Previous(0).StartTime, overall_decay_base);

private double applyDecay(double value, double deltaTime, double decayBase)
=> value * Math.Pow(decayBase, deltaTime / 1000);
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ppy.osu.Game" Version="2022.612.0" />
<PackageReference Include="ppy.osu.Game" Version="2022.615.0" />
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.Analysis.Kuromoji" Version="4.8.0-beta00016" />
<PackageReference Include="NicoKaraParser" Version="1.1.0" />
Expand Down

0 comments on commit 06d9970

Please sign in to comment.