handle pixel_len 0 for catch
This commit is contained in:
+2
-1
@@ -5,8 +5,9 @@
|
||||
|
||||
- __Fixes:__
|
||||
- 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 infinite loop on special ctb maps
|
||||
|
||||
# v0.9.1 (2022-10-26)
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ impl FruitOrJuice {
|
||||
|
||||
let mut curr_dist = tick_dist;
|
||||
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;
|
||||
|
||||
@@ -107,13 +106,17 @@ impl FruitOrJuice {
|
||||
curr_dist += tick_dist;
|
||||
}
|
||||
|
||||
params.attributes.n_tiny_droplets += tiny_droplet_count(
|
||||
h.start_time,
|
||||
time_add,
|
||||
total_duration,
|
||||
span_count as usize,
|
||||
¶ms.ticks,
|
||||
);
|
||||
if pixel_len > 0.0 {
|
||||
let time_add = total_duration * tick_dist / (pixel_len * span_count);
|
||||
|
||||
params.attributes.n_tiny_droplets += tiny_droplet_count(
|
||||
h.start_time,
|
||||
time_add,
|
||||
total_duration,
|
||||
span_count as usize,
|
||||
¶ms.ticks,
|
||||
);
|
||||
}
|
||||
|
||||
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 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 {
|
||||
0.0
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user