Moved X clamping from X to EffectiveX

This commit is contained in:
Drison64 2022-09-19 17:26:04 +02:00
parent 18fe37bb22
commit 4958421303
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ public abstract class CatchHitObject : HitObject, IHasPosition, IHasComboInforma
[JsonIgnore] [JsonIgnore]
public float X public float X
{ {
set => originalX.Value = Math.Clamp(value, 0, CatchPlayfield.WIDTH); set => originalX.Value = value;
} }
private HitObjectProperty<float> xOffset; private HitObjectProperty<float> xOffset;
@ -70,7 +70,7 @@ public float OriginalX
/// This value is the original <see cref="X"/> value plus the offset applied by the beatmap processing. /// This value is the original <see cref="X"/> value plus the offset applied by the beatmap processing.
/// Use <see cref="OriginalX"/> if a value not affected by the offset is desired. /// Use <see cref="OriginalX"/> if a value not affected by the offset is desired.
/// </remarks> /// </remarks>
public float EffectiveX => OriginalX + XOffset; public float EffectiveX => Math.Clamp(OriginalX + XOffset, 0, CatchPlayfield.WIDTH);
public double TimePreempt { get; set; } = 1000; public double TimePreempt { get; set; } = 1000;