read 'uninherited' value to determine timing point type
This commit is contained in:
+2
-1
@@ -7,4 +7,5 @@ output
|
||||
/pp-gen/output.json
|
||||
|
||||
/pp-plot/.env
|
||||
/pp-plot/target
|
||||
/pp-plot/target
|
||||
/pp-plot/accuracy_*
|
||||
@@ -1,6 +1,7 @@
|
||||
## Upcoming
|
||||
|
||||
- osu: Fix panic on maps with 0 objects
|
||||
- Fixed timing point parsing on some (older) maps where "uninherited" value did not coincide with beat length
|
||||
- Added `AttributeProvider` impl for `{Mode}PerformanceAttributes`
|
||||
- [BREAKING] Store `HitObject::sound` in `Beatmap::sounds` instead to reduce the struct size
|
||||
- [BREAKING] Removed the mode features `osu`, `fruits`, `taiko`, and `mania`. Now all modes are always supported.
|
||||
|
||||
+17
-10
@@ -278,11 +278,26 @@ macro_rules! parse_timingpoints_body {
|
||||
.validate()?;
|
||||
|
||||
let beat_len: f64 = split.next().next_field("beat len")?.trim().parse()?;
|
||||
let timing_change = split.nth(4).and_then(|value| value.bytes().next());
|
||||
|
||||
if timing_change == Some(b'1') {
|
||||
$self.timing_points.push(TimingPoint { time, beat_len });
|
||||
|
||||
if time < prev_time {
|
||||
unsorted_timings = true;
|
||||
} else {
|
||||
prev_time = time;
|
||||
}
|
||||
} else {
|
||||
let speed_multiplier = if beat_len < 0.0 {
|
||||
(-100.0 / beat_len).max(0.1).min(10.0)
|
||||
} else {
|
||||
1.0
|
||||
};
|
||||
|
||||
if beat_len < 0.0 {
|
||||
let point = DifficultyPoint {
|
||||
time,
|
||||
speed_multiplier: (-100.0 / beat_len).max(0.1).min(10.0),
|
||||
speed_multiplier,
|
||||
};
|
||||
|
||||
$self.difficulty_points.push(point);
|
||||
@@ -292,14 +307,6 @@ macro_rules! parse_timingpoints_body {
|
||||
} else {
|
||||
prev_diff = time;
|
||||
}
|
||||
} else {
|
||||
$self.timing_points.push(TimingPoint { time, beat_len });
|
||||
|
||||
if time < prev_time {
|
||||
unsorted_timings = true;
|
||||
} else {
|
||||
prev_time = time;
|
||||
}
|
||||
}
|
||||
|
||||
$buf.clear();
|
||||
|
||||
Reference in New Issue
Block a user