1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 16:07:24 +08:00

Remove result storage from hitobject

This commit is contained in:
smoogipoo 2020-11-10 18:56:09 +09:00
parent f5076fe3b8
commit 88112801eb
2 changed files with 0 additions and 12 deletions

View File

@ -166,16 +166,10 @@ namespace osu.Game.Rulesets.Objects.Drawables
HitObject = hitObject ?? throw new InvalidOperationException($"Cannot apply a null {nameof(HitObject)}.");
// Copy any existing result from the hitobject (required for rewind / judgement revert).
Result = HitObject.Result;
// Ensure this DHO has a result.
Result ??= CreateResult(HitObject.CreateJudgement())
?? throw new InvalidOperationException($"{GetType().ReadableName()} must provide a {nameof(JudgementResult)} through {nameof(CreateResult)}.");
// Ensure the hitobject has a result.
HitObject.Result = Result;
foreach (var h in HitObject.NestedHitObjects)
{
var drawableNested = CreateNestedHitObject(h) ?? throw new InvalidOperationException($"{nameof(CreateNestedHitObject)} returned null for {h.GetType().ReadableName()}.");

View File

@ -12,7 +12,6 @@ using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Scoring;
@ -169,11 +168,6 @@ namespace osu.Game.Rulesets.Objects
/// </summary>
[NotNull]
protected virtual HitWindows CreateHitWindows() => new HitWindows();
/// <summary>
/// The result this <see cref="HitObject"/> was judged with. Used internally for rewinding within <see cref="DrawableHitObject"/>.
/// </summary>
internal JudgementResult Result;
}
public static class HitObjectExtensions