handle pixel_len 0 for catch
This commit is contained in:
+2
-1
@@ -5,8 +5,9 @@
|
|||||||
|
|
||||||
- __Fixes:__
|
- __Fixes:__
|
||||||
- Fixed passed object count for taiko by ignoring non-circles
|
- Fixed passed object count for taiko by ignoring non-circles
|
||||||
- Fixed a niche panic on UTF-16 encoded maps. ([#18])
|
- Fixed a niche panic on UTF-16 encoded maps ([#18])
|
||||||
- Fixed an occasional underflow when calculating accuracy pp
|
- Fixed an occasional underflow when calculating accuracy pp
|
||||||
|
- Fixed an infinite loop on special ctb maps
|
||||||
|
|
||||||
# v0.9.1 (2022-10-26)
|
# v0.9.1 (2022-10-26)
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ impl FruitOrJuice {
|
|||||||
|
|
||||||
let mut curr_dist = tick_dist;
|
let mut curr_dist = tick_dist;
|
||||||
let pixel_len = pixel_len.unwrap_or(0.0);
|
let pixel_len = pixel_len.unwrap_or(0.0);
|
||||||
let time_add = total_duration * tick_dist / (pixel_len * span_count);
|
|
||||||
|
|
||||||
let target = pixel_len - tick_dist / 8.0;
|
let target = pixel_len - tick_dist / 8.0;
|
||||||
|
|
||||||
@@ -107,13 +106,17 @@ impl FruitOrJuice {
|
|||||||
curr_dist += tick_dist;
|
curr_dist += tick_dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
params.attributes.n_tiny_droplets += tiny_droplet_count(
|
if pixel_len > 0.0 {
|
||||||
h.start_time,
|
let time_add = total_duration * tick_dist / (pixel_len * span_count);
|
||||||
time_add,
|
|
||||||
total_duration,
|
params.attributes.n_tiny_droplets += tiny_droplet_count(
|
||||||
span_count as usize,
|
h.start_time,
|
||||||
¶ms.ticks,
|
time_add,
|
||||||
);
|
total_duration,
|
||||||
|
span_count as usize,
|
||||||
|
¶ms.ticks,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
slider_objects.reserve(span_count as usize * (params.ticks.len()));
|
slider_objects.reserve(span_count as usize * (params.ticks.len()));
|
||||||
|
|
||||||
|
|||||||
@@ -599,6 +599,7 @@ impl OsuPpInner {
|
|||||||
let better_acc_percentage = if amount_hit_objects_with_acc > 0 {
|
let better_acc_percentage = if amount_hit_objects_with_acc > 0 {
|
||||||
let sub = self.state.total_hits() - amount_hit_objects_with_acc;
|
let sub = self.state.total_hits() - amount_hit_objects_with_acc;
|
||||||
|
|
||||||
|
// * It is possible to reach a negative accuracy with this formula. Cap it at zero - zero points.
|
||||||
if self.state.n300 < sub {
|
if self.state.n300 < sub {
|
||||||
0.0
|
0.0
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user