store duration instead of end_time (/b/1901200+Mania)
This commit is contained in:
@@ -107,9 +107,9 @@ fn convert_object<'a>(
|
||||
|
||||
ObjectIterState::JuiceStream(stream)
|
||||
}
|
||||
HitObjectKind::Spinner(Spinner { end_time })
|
||||
| HitObjectKind::Hold(HoldNote { end_time }) => {
|
||||
ObjectIterState::BananaShower(BananaShower::new(h.start_time, end_time))
|
||||
HitObjectKind::Spinner(Spinner { duration })
|
||||
| HitObjectKind::Hold(HoldNote { duration }) => {
|
||||
ObjectIterState::BananaShower(BananaShower::new(h.start_time, duration))
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ pub struct BananaShower {
|
||||
}
|
||||
|
||||
impl BananaShower {
|
||||
pub fn new(start_time: f64, end_time: f64) -> Self {
|
||||
let duration = end_time - start_time;
|
||||
pub fn new(start_time: f64, duration: f64) -> Self {
|
||||
let mut spacing = duration;
|
||||
let end_time = start_time + duration;
|
||||
|
||||
while spacing > 100.0 {
|
||||
spacing /= 2.0;
|
||||
|
||||
Reference in New Issue
Block a user