mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Fix replay analysis overlay not rotating with Barrel Roll enabled
Closes https://github.com/ppy/osu/issues/29839.
This commit is contained in:
parent
b78ef81bf1
commit
4a39873e2a
@ -44,7 +44,8 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
if (replayPlayer != null)
|
if (replayPlayer != null)
|
||||||
{
|
{
|
||||||
PlayfieldAdjustmentContainer.Add(new ReplayAnalysisOverlay(replayPlayer.Score.Replay));
|
ReplayAnalysisOverlay analysisOverlay;
|
||||||
|
PlayfieldAdjustmentContainer.Add(analysisOverlay = new ReplayAnalysisOverlay(replayPlayer.Score.Replay));
|
||||||
replayPlayer.AddSettings(new ReplayAnalysisSettings(Config));
|
replayPlayer.AddSettings(new ReplayAnalysisSettings(Config));
|
||||||
|
|
||||||
cursorHideEnabled = Config.GetBindable<bool>(OsuRulesetSetting.ReplayCursorHideEnabled);
|
cursorHideEnabled = Config.GetBindable<bool>(OsuRulesetSetting.ReplayCursorHideEnabled);
|
||||||
|
@ -40,9 +40,11 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
|
|
||||||
public override string SettingDescription => $"{SpinSpeed.Value:N2} rpm {Direction.Value.GetDescription().ToLowerInvariant()}";
|
public override string SettingDescription => $"{SpinSpeed.Value:N2} rpm {Direction.Value.GetDescription().ToLowerInvariant()}";
|
||||||
|
|
||||||
|
private PlayfieldAdjustmentContainer playfieldAdjustmentContainer = null!;
|
||||||
|
|
||||||
public void Update(Playfield playfield)
|
public void Update(Playfield playfield)
|
||||||
{
|
{
|
||||||
playfield.Rotation = CurrentRotation = (Direction.Value == RotationDirection.Counterclockwise ? -1 : 1) * 360 * (float)(playfield.Time.Current / 60000 * SpinSpeed.Value);
|
playfieldAdjustmentContainer.Rotation = CurrentRotation = (Direction.Value == RotationDirection.Counterclockwise ? -1 : 1) * 360 * (float)(playfield.Time.Current / 60000 * SpinSpeed.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplyToDrawableRuleset(DrawableRuleset<TObject> drawableRuleset)
|
public void ApplyToDrawableRuleset(DrawableRuleset<TObject> drawableRuleset)
|
||||||
@ -52,7 +54,9 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
var playfieldSize = drawableRuleset.Playfield.DrawSize;
|
var playfieldSize = drawableRuleset.Playfield.DrawSize;
|
||||||
float minSide = MathF.Min(playfieldSize.X, playfieldSize.Y);
|
float minSide = MathF.Min(playfieldSize.X, playfieldSize.Y);
|
||||||
float maxSide = MathF.Max(playfieldSize.X, playfieldSize.Y);
|
float maxSide = MathF.Max(playfieldSize.X, playfieldSize.Y);
|
||||||
drawableRuleset.Playfield.Scale = new Vector2(minSide / maxSide);
|
|
||||||
|
playfieldAdjustmentContainer = drawableRuleset.PlayfieldAdjustmentContainer;
|
||||||
|
playfieldAdjustmentContainer.Scale = new Vector2(minSide / maxSide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user