From f374af7ce77a2fb77e52f2fbb88f3131eb560fa1 Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Thu, 21 Aug 2025 17:15:39 +0300 Subject: [PATCH] Fix taiko flashlight applying aspect ratio twice --- .../Mods/TaikoModFlashlight.cs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs index 64f2f4c18a..02c06850b7 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs @@ -47,28 +47,15 @@ namespace osu.Game.Rulesets.Taiko.Mods { this.taikoPlayfield = taikoPlayfield; - FlashlightSize = adjustSizeForPlayfieldAspectRatio(GetSize()); + FlashlightSize = new Vector2(0, GetSize()); FlashlightSmoothness = 1.4f; AddLayout(flashlightProperties); } - /// - /// Returns the aspect ratio-adjusted size of the flashlight. - /// This ensures that the size of the flashlight remains independent of taiko-specific aspect ratio adjustments. - /// - /// - /// The size of the flashlight. - /// The value provided here should always come from . - /// - private Vector2 adjustSizeForPlayfieldAspectRatio(float size) - { - return new Vector2(0, size * taikoPlayfield.Parent!.Scale.Y); - } - protected override void UpdateFlashlightSize(float size) { - this.TransformTo(nameof(FlashlightSize), adjustSizeForPlayfieldAspectRatio(size), FLASHLIGHT_FADE_DURATION); + this.TransformTo(nameof(FlashlightSize), new Vector2(0, size), FLASHLIGHT_FADE_DURATION); } protected override string FragmentShader => "CircularFlashlight"; @@ -82,7 +69,7 @@ namespace osu.Game.Rulesets.Taiko.Mods FlashlightPosition = ToLocalSpace(taikoPlayfield.HitTarget.ScreenSpaceDrawQuad.Centre); ClearTransforms(targetMember: nameof(FlashlightSize)); - FlashlightSize = adjustSizeForPlayfieldAspectRatio(GetSize()); + FlashlightSize = new Vector2(0, GetSize()); flashlightProperties.Validate(); }