mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 16:32:54 +08:00
Cleaning up code
This commit is contained in:
parent
a57c277a58
commit
e9a4ee6800
@ -71,9 +71,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
||||
setDistances(clockRate);
|
||||
}
|
||||
|
||||
public double opacity(double ms, bool hidden)
|
||||
public double Opacity(double ms, bool hidden)
|
||||
{
|
||||
double preemptTime = BaseObject.TimePreempt / clockRate;
|
||||
|
||||
if (hidden)
|
||||
return Math.Clamp(Math.Min((1 - ms / preemptTime) * 2.5, (ms / preemptTime) * (1.0 / 0.3)), 0.0, 1.0);
|
||||
else
|
||||
|
@ -70,7 +70,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
double stackNerf = Math.Min(1.0, (osuPrevious.JumpDistance / scalingFactor) / 25.0);
|
||||
|
||||
// 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(cumulativeStrainTime, hidden));
|
||||
|
||||
result += Math.Pow(0.8, i) * stackNerf * opacityBonus * scalingFactor * jumpDistance / cumulativeStrainTime;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user