1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +08:00

Fix rotation not being updated correctly on start time change

This commit is contained in:
Dean Herbert 2024-09-17 16:18:29 +09:00
parent c1c0d49bfe
commit f8fff4074d
No known key found for this signature in database
3 changed files with 10 additions and 7 deletions

View File

@ -44,10 +44,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
private float startAngle;
private float endAngle;
protected override void OnApply()
protected override void UpdateInitialTransforms()
{
base.OnApply();
base.UpdateInitialTransforms();
// Important to have this in UpdateInitialTransforms() to it is re-triggered by RefreshStateTransforms().
const float end_scale = 0.6f;
const float random_scale_range = 1.6f;

View File

@ -30,11 +30,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
private float startRotation;
protected override void OnApply()
protected override void UpdateInitialTransforms()
{
base.OnApply();
base.UpdateInitialTransforms();
// roughly matches osu-stable
// Important to have this in UpdateInitialTransforms() to it is re-triggered by RefreshStateTransforms().
startRotation = RandomSingle(1) * 20;
}

View File

@ -27,9 +27,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
_ => new FruitPiece());
}
protected override void OnApply()
protected override void UpdateInitialTransforms()
{
base.OnApply();
base.UpdateInitialTransforms();
// Important to have this in UpdateInitialTransforms() to it is re-triggered by RefreshStateTransforms().
ScalingContainer.Rotation = (RandomSingle(1) - 0.5f) * 40;
}
}