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()}.");