1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 05:47:20 +08:00

more clean-up

This commit is contained in:
Givikap120 2024-03-23 13:44:47 +02:00
parent 53b918ecc1
commit 529bd8483b
3 changed files with 1 additions and 22 deletions

View File

@ -141,11 +141,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty
OverallDifficulty = values[ATTRIB_ID_OVERALL_DIFFICULTY];
ApproachRate = values[ATTRIB_ID_APPROACH_RATE];
StarRating = values[ATTRIB_ID_DIFFICULTY];
FlashlightDifficulty = values.GetValueOrDefault(ATTRIB_ID_FLASHLIGHT);
SliderFactor = values[ATTRIB_ID_SLIDER_FACTOR];
SpeedNoteCount = values[ATTRIB_ID_SPEED_NOTE_COUNT];
FlashlightDifficulty = values.GetValueOrDefault(ATTRIB_ID_FLASHLIGHT);
DrainRate = onlineInfo.DrainRate;
HitCircleCount = onlineInfo.CircleCount;
SliderCount = onlineInfo.SliderCount;

View File

@ -150,9 +150,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
OsuDifficultyHitObject prevObject = this;
bool log = false;
if (log) Console.WriteLine($"Checking for object {hitObject.StartTime}");
foreach (var loopObj in retrieveCurrentVisibleObjects(this))
{
double currentOverlapness = calculateOverlapness(this, loopObj); // overlapness with this object
@ -162,12 +159,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
if (loopObj.Angle != null) angleFactor += (-Math.Cos((double)loopObj.Angle) + 1) / 2; // =2 for wide angles, =1 for acute angles
instantOverlapness = Math.Min(1, instantOverlapness * angleFactor); // wide angles are more predictable
if (log) Console.WriteLine($"Base overlapness - {currentOverlapness}");
currentOverlapness *= (1 - instantOverlapness) * 2; // wide angles will have close-to-zero buff
if (log) Console.WriteLine($"Adjusted overlapness - {currentOverlapness}");
if (currentOverlapness > 0)
{
double difference = Math.Min(timeWithoutOverlap, prevTimeWithoutOverlap) / Math.Max(timeWithoutOverlap, prevTimeWithoutOverlap);
@ -175,8 +168,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
currentOverlapness *= differenceActuation(difference);
if (log) Console.WriteLine($"Overlapness [{prevTimeWithoutOverlap} -> {timeWithoutOverlap}], difference {difference}, actuation {differenceActuation(difference)}, result {currentOverlapness}");
prevTimeWithoutOverlap = timeWithoutOverlap;
timeWithoutOverlap = 0;
}
@ -184,18 +175,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
else
{
timeWithoutOverlap += prevObject.DeltaTime;
if (log) Console.WriteLine($"No overlapness, adding {prevObject.DeltaTime}, result {timeWithoutOverlap}");
}
totalOverlapnessDifficulty += currentOverlapness;
OverlapObjects.Add(new OverlapObject(loopObj, totalOverlapnessDifficulty));
prevObject = loopObj;
if (log) Console.WriteLine($"Added object with difficulty {totalOverlapnessDifficulty}\n");
}
if (log) Console.WriteLine("\n");
}
private static double differenceActuation(double difference)

View File

@ -19,12 +19,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
{
aimComponent = new HighARAimComponent(mods);
speedComponent = new HighARSpeedComponent(mods);
aimComponentNoAdjust = new HighARAimComponent(mods, false);
}
private HighARAimComponent aimComponent;
private HighARAimComponent aimComponentNoAdjust;
private HighARSpeedComponent speedComponent;
private readonly List<double> difficulties = new List<double>();
@ -35,8 +32,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
aimComponent.Process(current);
speedComponent.Process(current);
aimComponentNoAdjust.Process(current);
if (current.BaseObject is not Spinner)
objectsCount++;