mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:03:21 +08:00
Fix wrong opacity formula
This commit is contained in:
parent
e9a4ee6800
commit
e9745a3ac4
@ -74,11 +74,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
|||||||
public double Opacity(double ms, bool hidden)
|
public double Opacity(double ms, bool hidden)
|
||||||
{
|
{
|
||||||
double preemptTime = BaseObject.TimePreempt / clockRate;
|
double preemptTime = BaseObject.TimePreempt / clockRate;
|
||||||
|
double fadeInTime = BaseObject.TimeFadeIn / clockRate;
|
||||||
|
|
||||||
if (hidden)
|
if (hidden)
|
||||||
return Math.Clamp(Math.Min((1 - ms / preemptTime) * 2.5, (ms / preemptTime) * (1.0 / 0.3)), 0.0, 1.0);
|
return Math.Clamp(Math.Min((1.0 - ms / preemptTime) * 2.5, (ms / preemptTime - 0.3) * (1.0 / 0.3)), 0.0, 1.0);
|
||||||
else
|
else
|
||||||
return Math.Clamp((1.0 - ms / preemptTime) * 1.5, 0.0, 1.0);
|
return Math.Clamp((preemptTime - ms) / fadeInTime, 0.0, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDistances(double clockRate)
|
private void setDistances(double clockRate)
|
||||||
|
Loading…
Reference in New Issue
Block a user