mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Allow non-pooled DHO to be reused
This commit is contained in:
parent
f3f5ec7665
commit
05e245d445
@ -135,10 +135,8 @@ namespace osu.Game.Rulesets.UI
|
||||
/// <param name="h">The DrawableHitObject to add.</param>
|
||||
public virtual void Add(DrawableHitObject h)
|
||||
{
|
||||
if (h.IsInitialized)
|
||||
throw new InvalidOperationException($"{nameof(Add)} doesn't support {nameof(DrawableHitObject)} reuse. Use pooling instead.");
|
||||
|
||||
onNewDrawableHitObject(h);
|
||||
if (!h.IsInitialized)
|
||||
onNewDrawableHitObject(h);
|
||||
|
||||
HitObjectContainer.Add(h);
|
||||
OnHitObjectAdded(h.HitObject);
|
||||
|
Loading…
Reference in New Issue
Block a user