1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 08:13:31 +08:00

Clear existing transforms on DHO return to pool

This commit is contained in:
Bartłomiej Dach 2020-11-15 19:45:49 +01:00
parent 42de4437cc
commit 9c0a0031d6

View File

@ -287,6 +287,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
HitObject = null;
lifetimeEntry = null;
clearExistingStateTransforms();
hasHitObjectApplied = false;
}
@ -403,8 +405,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
double transformTime = HitObject.StartTime - InitialLifetimeOffset;
base.ApplyTransformsAt(double.MinValue, true);
base.ClearTransformsAfter(double.MinValue, true);
clearExistingStateTransforms();
using (BeginAbsoluteSequence(transformTime, true))
UpdateInitialTransforms();
@ -432,6 +433,12 @@ namespace osu.Game.Rulesets.Objects.Drawables
PlaySamples();
}
private void clearExistingStateTransforms()
{
base.ApplyTransformsAt(double.MinValue, true);
base.ClearTransformsAfter(double.MinValue, true);
}
/// <summary>
/// Apply (generally fade-in) transforms leading into the <see cref="HitObject"/> start time.
/// The local drawable hierarchy is recursively delayed to <see cref="LifetimeStart"/> for convenience.