mirror of https://github.com/ppy/osu
fix
This commit is contained in:
parent
cc96d275c2
commit
847b63066b
|
@ -418,10 +418,13 @@ private CaughtObject getDroppedObject(CaughtObject caughtObject)
|
|||
|
||||
private void clearPlate(DroppedObjectAnimation animation)
|
||||
{
|
||||
var droppedObjects = caughtObjectContainer.Children.Select(getDroppedObject).ToArray();
|
||||
var caughtObjects = caughtObjectContainer.Children.ToArray();
|
||||
|
||||
caughtObjectContainer.Clear(false);
|
||||
|
||||
//use the already returned PoolableDrawables for new objects
|
||||
var droppedObjects = caughtObjects.Select(getDroppedObject).ToArray();
|
||||
|
||||
droppedObjectTarget.AddRange(droppedObjects);
|
||||
|
||||
foreach (var droppedObject in droppedObjects)
|
||||
|
@ -430,13 +433,11 @@ private void clearPlate(DroppedObjectAnimation animation)
|
|||
|
||||
private void removeFromPlate(CaughtObject caughtObject, DroppedObjectAnimation animation)
|
||||
{
|
||||
var droppedObject = getDroppedObject(caughtObject);
|
||||
|
||||
caughtObjectContainer.Remove(caughtObject, false);
|
||||
|
||||
droppedObjectTarget.Add(droppedObject);
|
||||
droppedObjectTarget.Add(getDroppedObject(caughtObject));
|
||||
|
||||
applyDropAnimation(droppedObject, animation);
|
||||
applyDropAnimation(caughtObject, animation);
|
||||
}
|
||||
|
||||
private void applyDropAnimation(Drawable d, DroppedObjectAnimation animation)
|
||||
|
@ -456,6 +457,8 @@ private void applyDropAnimation(Drawable d, DroppedObjectAnimation animation)
|
|||
break;
|
||||
}
|
||||
|
||||
//define lifetime start for dropped objects to be disposed correctly when rewinding replay
|
||||
d.LifetimeStart = Clock.CurrentTime;
|
||||
d.Expire();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue