mirror of
https://github.com/ppy/osu
synced 2025-01-20 13:00:54 +00:00
Expose non-adjusted time from CalculateTimed()
This commit is contained in:
parent
eaeee80a26
commit
0cdd2898fe
@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
foreach (var skill in skills)
|
||||
skill.ProcessInternal(hitObject);
|
||||
|
||||
attribs.Add(new TimedDifficultyAttributes(hitObject.EndTime, CreateDifficultyAttributes(progressiveBeatmap, playableMods, skills, clockRate)));
|
||||
attribs.Add(new TimedDifficultyAttributes(hitObject.EndTime * clockRate, CreateDifficultyAttributes(progressiveBeatmap, playableMods, skills, clockRate)));
|
||||
}
|
||||
|
||||
return attribs;
|
||||
|
@ -11,7 +11,14 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
/// </summary>
|
||||
public class TimedDifficultyAttributes : IComparable<TimedDifficultyAttributes>
|
||||
{
|
||||
/// <summary>
|
||||
/// The non-clock adjusted time value at which the attributes take effect.
|
||||
/// </summary>
|
||||
public readonly double Time;
|
||||
|
||||
/// <summary>
|
||||
/// The attributes.
|
||||
/// </summary>
|
||||
public readonly DifficultyAttributes Attributes;
|
||||
|
||||
public TimedDifficultyAttributes(double time, DifficultyAttributes attributes)
|
||||
|
@ -48,9 +48,6 @@ namespace osu.Game.Screens.Play.HUD
|
||||
[CanBeNull]
|
||||
private GameplayState gameplayState { get; set; }
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private GameplayClock gameplayClock { get; set; }
|
||||
|
||||
[CanBeNull]
|
||||
private List<TimedDifficultyAttributes> timedAttributes;
|
||||
|
||||
@ -136,12 +133,10 @@ namespace osu.Game.Screens.Play.HUD
|
||||
[CanBeNull]
|
||||
private DifficultyAttributes getAttributeAtTime(JudgementResult judgement)
|
||||
{
|
||||
if (timedAttributes == null || timedAttributes.Count == 0 || gameplayClock == null)
|
||||
if (timedAttributes == null || timedAttributes.Count == 0)
|
||||
return null;
|
||||
|
||||
double judgementTime = judgement.HitObject.GetEndTime() / gameplayClock.TrueGameplayRate;
|
||||
|
||||
int attribIndex = timedAttributes.BinarySearch(new TimedDifficultyAttributes(judgementTime, null));
|
||||
int attribIndex = timedAttributes.BinarySearch(new TimedDifficultyAttributes(judgement.HitObject.GetEndTime(), null));
|
||||
if (attribIndex < 0)
|
||||
attribIndex = ~attribIndex - 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user