Skip to content

Commit

Permalink
Fix Hard Rock mod application doubly-flipping slider head and tail po…
Browse files Browse the repository at this point in the history
…sitions
  • Loading branch information
Rian8337 committed Dec 21, 2024
1 parent 194454d commit 8d71319
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/com/rian/osu/mods/ModHardRock.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8d71319

Please sign in to comment.