From 8d713195792ce615750fca5e13d6945b0395bbc4 Mon Sep 17 00:00:00 2001 From: "Rian (Reza Mouna Hendrian)" <52914632+Rian8337@users.noreply.github.com> Date: Sat, 21 Dec 2024 16:43:46 +0800 Subject: [PATCH] Fix Hard Rock mod application doubly-flipping slider head and tail positions --- src/com/rian/osu/mods/ModHardRock.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/rian/osu/mods/ModHardRock.kt b/src/com/rian/osu/mods/ModHardRock.kt index 6b8ac9963..9b9e9b5ca 100644 --- a/src/com/rian/osu/mods/ModHardRock.kt +++ b/src/com/rian/osu/mods/ModHardRock.kt @@ -59,7 +59,11 @@ class ModHardRock : Mod(), IModApplicableToDifficulty, IModApplicableToHitObject ) // Reflect the position of slider ticks and repeats. - hitObject.nestedHitObjects.forEach { it.position = reflectVector(it.position) } + for (i in 1 until hitObject.nestedHitObjects.size - 1) { + val obj = hitObject.nestedHitObjects[i] + + obj.position = reflectVector(obj.position) + } } private fun applySetting(value: Float, ratio: Float = ADJUST_RATIO) = min(value * ratio, 10f)