mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Fix setting lifetime during KeepAlive is ignored
This commit is contained in:
@ -32,12 +32,11 @@ namespace osu.Game.Rulesets.Objects.Pooling
|
|||||||
get => Entry?.LifetimeStart ?? double.MinValue;
|
get => Entry?.LifetimeStart ?? double.MinValue;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (LifetimeStart == value) return;
|
if (Entry == null && LifetimeStart != value)
|
||||||
|
|
||||||
if (Entry == null)
|
|
||||||
throw new InvalidOperationException($"Cannot modify lifetime of {nameof(PoolableDrawableWithLifetime<TEntry>)} when entry is not set");
|
throw new InvalidOperationException($"Cannot modify lifetime of {nameof(PoolableDrawableWithLifetime<TEntry>)} when entry is not set");
|
||||||
|
|
||||||
Entry.LifetimeStart = value;
|
if (Entry != null)
|
||||||
|
Entry.LifetimeStart = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,12 +45,11 @@ namespace osu.Game.Rulesets.Objects.Pooling
|
|||||||
get => Entry?.LifetimeEnd ?? double.MaxValue;
|
get => Entry?.LifetimeEnd ?? double.MaxValue;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (LifetimeEnd == value) return;
|
if (Entry == null && LifetimeEnd != value)
|
||||||
|
|
||||||
if (Entry == null)
|
|
||||||
throw new InvalidOperationException($"Cannot modify lifetime of {nameof(PoolableDrawableWithLifetime<TEntry>)} when entry is not set");
|
throw new InvalidOperationException($"Cannot modify lifetime of {nameof(PoolableDrawableWithLifetime<TEntry>)} when entry is not set");
|
||||||
|
|
||||||
Entry.LifetimeEnd = value;
|
if (Entry != null)
|
||||||
|
Entry.LifetimeEnd = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user