mirror of https://github.com/ppy/osu
Fix improperly considering rate adjustment mods
This commit is contained in:
parent
1f9892802c
commit
a0ee86ddd2
|
@ -10,10 +10,10 @@ namespace osu.Game.Rulesets.Mania.Difficulty
|
|||
public class ManiaDifficultyAttributes : DifficultyAttributes
|
||||
{
|
||||
/// <summary>
|
||||
/// The perceived hit window for a GREAT hit inclusive of rate-adjusting mods (DT/HT/etc).
|
||||
/// The hit window for a GREAT hit inclusive of rate-adjusting mods (DT/HT/etc).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Rate-adjusting mods don't directly affect the hit window, but have a perceived effect as a result of adjusting audio timing.
|
||||
/// Rate-adjusting mods do not affect the hit window at all in osu-stable.
|
||||
/// </remarks>
|
||||
[JsonProperty("great_hit_window")]
|
||||
public double GreatHitWindow { get; set; }
|
||||
|
|
|
@ -48,7 +48,7 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
|
|||
{
|
||||
StarRating = skills[0].DifficultyValue() * star_scaling_factor,
|
||||
Mods = mods,
|
||||
GreatHitWindow = Math.Ceiling(getHitWindow300(mods) / clockRate),
|
||||
GreatHitWindow = Math.Ceiling((int)(getHitWindow300(mods) * clockRate) / clockRate),
|
||||
ScoreMultiplier = getScoreMultiplier(mods),
|
||||
MaxCombo = beatmap.HitObjects.Sum(h => h is HoldNote ? 2 : 1),
|
||||
};
|
||||
|
@ -108,7 +108,7 @@ protected override Mod[] DifficultyAdjustmentMods
|
|||
}
|
||||
}
|
||||
|
||||
private int getHitWindow300(Mod[] mods)
|
||||
private double getHitWindow300(Mod[] mods)
|
||||
{
|
||||
if (isForCurrentRuleset)
|
||||
{
|
||||
|
@ -121,19 +121,14 @@ private int getHitWindow300(Mod[] mods)
|
|||
|
||||
return applyModAdjustments(47, mods);
|
||||
|
||||
static int applyModAdjustments(double value, Mod[] mods)
|
||||
static double applyModAdjustments(double value, Mod[] mods)
|
||||
{
|
||||
if (mods.Any(m => m is ManiaModHardRock))
|
||||
value /= 1.4;
|
||||
else if (mods.Any(m => m is ManiaModEasy))
|
||||
value *= 1.4;
|
||||
|
||||
if (mods.Any(m => m is ManiaModDoubleTime))
|
||||
value *= 1.5;
|
||||
else if (mods.Any(m => m is ManiaModHalfTime))
|
||||
value *= 0.75;
|
||||
|
||||
return (int)value;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue