fixed slider end_pos
This commit is contained in:
+4
-2
@@ -155,7 +155,8 @@ pub fn stars(
|
||||
}
|
||||
|
||||
// Slider tail
|
||||
let pos = h.pos + curve.position_at(1.0); // TODO: what if reversing odd amount?
|
||||
let progress = (*repeats % 2 == 0) as u8 as f32;
|
||||
let pos = h.pos + curve.position_at(progress);
|
||||
slider_objects.push((pos, h.start_time + duration));
|
||||
|
||||
fruits += span_count; // TODO: +1?
|
||||
@@ -386,7 +387,8 @@ pub fn strains(map: &Beatmap, mods: impl Mods) -> Strains {
|
||||
}
|
||||
|
||||
// Slider tail
|
||||
let pos = curve.position_at(1.0); // TODO: what if reversing odd amount?
|
||||
let progress = (*repeats % 2 == 0) as u8 as f32;
|
||||
let pos = curve.position_at(progress);
|
||||
slider_objects.push((pos, h.start_time + duration));
|
||||
|
||||
let iter = slider_objects.into_iter().map(CatchObject::new);
|
||||
|
||||
+2
-2
@@ -54,7 +54,7 @@ fn custom_osu() {
|
||||
|
||||
use crate::{Beatmap, OsuPP};
|
||||
|
||||
let path = "E:Games/osu!/beatmaps/1402167.osu";
|
||||
let path = "E:Games/osu!/beatmaps/156352_.osu";
|
||||
let file = File::open(path).unwrap();
|
||||
|
||||
let start = Instant::now();
|
||||
@@ -76,7 +76,7 @@ fn custom_osu() {
|
||||
println!("Parsing average: {:?}", accum / iters);
|
||||
|
||||
let start = Instant::now();
|
||||
let result = OsuPP::new(&map).mods(64 + 16).calculate();
|
||||
let result = OsuPP::new(&map).mods(1024).calculate();
|
||||
|
||||
let iters = 100;
|
||||
let accum = start.elapsed();
|
||||
|
||||
@@ -178,8 +178,8 @@ impl OsuObject {
|
||||
|
||||
ticks.clear();
|
||||
|
||||
// TODO: what if reversing odd amount?
|
||||
let mut end_pos = h.pos + curve.position_at(1.0);
|
||||
let progress = (*repeats % 2 == 0) as u8 as f32;
|
||||
let mut end_pos = h.pos + curve.position_at(progress);
|
||||
travel_dist *= *scaling_factor;
|
||||
|
||||
if hr {
|
||||
|
||||
@@ -161,8 +161,8 @@ impl OsuObject {
|
||||
|
||||
ticks.clear();
|
||||
|
||||
// TODO: what if reversing odd amount?
|
||||
let end_pos = h.pos + curve.position_at(1.0);
|
||||
let progress = (*repeats % 2 == 0) as u8 as f32;
|
||||
let end_pos = h.pos + curve.position_at(progress);
|
||||
travel_dist *= *scaling_factor;
|
||||
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user