1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 19:53:23 +08:00

Change Opacity function to take in absolute map time rather than relative time

This commit is contained in:
MBmasher 2021-11-30 12:58:49 +11:00
parent 383bf7cdfc
commit b0dc8bf061
2 changed files with 5 additions and 2 deletions

View File

@ -71,8 +71,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
setDistances(clockRate); setDistances(clockRate);
} }
public double Opacity(double ms, bool hidden) public double Opacity(double T, bool hidden)
{ {
double ms = (BaseObject.StartTime - T) / clockRate;
if (ms < 0)
return 0.0;
double preemptTime = BaseObject.TimePreempt / clockRate; double preemptTime = BaseObject.TimePreempt / clockRate;
double fadeInTime = BaseObject.TimeFadeIn / clockRate; double fadeInTime = BaseObject.TimeFadeIn / clockRate;

View File

@ -70,7 +70,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
double stackNerf = Math.Min(1.0, (osuPrevious.JumpDistance / scalingFactor) / 25.0); double stackNerf = Math.Min(1.0, (osuPrevious.JumpDistance / scalingFactor) / 25.0);
// Bonus based on how visible the object is. // Bonus based on how visible the object is.
double opacityBonus = 1.0 + max_opacity_bonus * (1.0 - osuCurrent.Opacity(cumulativeStrainTime, hidden)); double opacityBonus = 1.0 + max_opacity_bonus * (1.0 - osuCurrent.Opacity(osuPreviousHitObject.StartTime, hidden));
result += Math.Pow(0.8, i) * stackNerf * opacityBonus * scalingFactor * jumpDistance / cumulativeStrainTime; result += Math.Pow(0.8, i) * stackNerf * opacityBonus * scalingFactor * jumpDistance / cumulativeStrainTime;
} }