mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Add comment regarding equality check importance in LegacyHitSampleInfo
This commit is contained in:
parent
997c091a8d
commit
c079a9cd32
@ -500,6 +500,9 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
=> new LegacyHitSampleInfo(newName.GetOr(Name), newBank.GetOr(Bank), newVolume.GetOr(Volume), newCustomSampleBank.GetOr(CustomSampleBank), newIsLayered.GetOr(IsLayered));
|
||||
|
||||
public bool Equals(LegacyHitSampleInfo? other)
|
||||
// The additions to equality checks here are *required* to ensure that pooling works correctly.
|
||||
// Of note, `IsLayered` may cause the usage of `SampleVirtual` instead of an actual sample (in cases playback is not required).
|
||||
// Removing it would cause samples which may actually require playback to potentially source for a `SampleVirtual` sample pool.
|
||||
=> base.Equals(other) && CustomSampleBank == other.CustomSampleBank && IsLayered == other.IsLayered;
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
|
Loading…
Reference in New Issue
Block a user