mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:28:00 +08:00
Fix osu! and catch hitobjects no longer scaled to 1 by default
This commit is contained in:
parent
1051009827
commit
8f80a22ef9
@ -130,7 +130,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
set => lastInCombo.Value = value;
|
||||
}
|
||||
|
||||
private HitObjectProperty<float> scale;
|
||||
private HitObjectProperty<float> scale = new HitObjectProperty<float>(1);
|
||||
|
||||
public Bindable<float> ScaleBindable => scale.Bindable;
|
||||
|
||||
|
@ -69,7 +69,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
|
||||
public double Radius => OBJECT_RADIUS * Scale;
|
||||
|
||||
private HitObjectProperty<float> scaleProperty;
|
||||
private HitObjectProperty<float> scaleProperty = new HitObjectProperty<float>(1);
|
||||
|
||||
public Bindable<float> ScaleBindable => scaleProperty.Bindable;
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
/// <summary>
|
||||
/// The underlying <see cref="Bindable{T}"/>, only initialised on first access.
|
||||
/// </summary>
|
||||
public Bindable<T> Bindable => backingBindable ??= new Bindable<T> { Value = backingValue };
|
||||
public Bindable<T> Bindable => backingBindable ??= new Bindable<T>(defaultValue) { Value = backingValue };
|
||||
|
||||
/// <summary>
|
||||
/// The current value, derived from and delegated to <see cref="Bindable"/> if initialised, or a temporary field otherwise.
|
||||
@ -40,5 +40,13 @@ namespace osu.Game.Rulesets.Objects
|
||||
backingValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly T defaultValue;
|
||||
|
||||
public HitObjectProperty(T value = default)
|
||||
{
|
||||
backingValue = defaultValue = value;
|
||||
backingBindable = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user