osu: fixed branch which didnt set hitresults
This commit is contained in:
@@ -222,6 +222,10 @@ impl<'m> OsuPP<'m> {
|
||||
} else {
|
||||
*self.n300.as_mut().unwrap() += remaining;
|
||||
}
|
||||
} else {
|
||||
self.n300.get_or_insert(0);
|
||||
self.n100.get_or_insert(0);
|
||||
self.n50.get_or_insert(0);
|
||||
}
|
||||
|
||||
let numerator = self.n50.unwrap() + self.n100.unwrap() * 2 + self.n300.unwrap() * 6;
|
||||
|
||||
@@ -280,7 +280,7 @@ mod tests {
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn no_leniency_single() {
|
||||
let file = match File::open("./maps/1949106.osu") {
|
||||
let file = match File::open("./maps/1791963.osu") {
|
||||
Ok(file) => file,
|
||||
Err(why) => panic!("Could not open file: {}", why),
|
||||
};
|
||||
@@ -290,7 +290,13 @@ mod tests {
|
||||
Err(why) => panic!("Error while parsing map: {}", why),
|
||||
};
|
||||
|
||||
let result = OsuPP::new(&map).mods(0).calculate();
|
||||
let result = OsuPP::new(&map)
|
||||
.n300(1206)
|
||||
.n100(15)
|
||||
.n50(0)
|
||||
.combo(1643)
|
||||
.mods(24)
|
||||
.calculate();
|
||||
|
||||
println!("Stars: {}", result.stars());
|
||||
println!("PP: {}", result.pp());
|
||||
|
||||
+1
-1
@@ -274,7 +274,7 @@ mod tests {
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn taiko_single() {
|
||||
let file = match File::open("E:/Games/osu!/beatmaps/168450.osu") {
|
||||
let file = match File::open("./maps/168450.osu") {
|
||||
Ok(file) => file,
|
||||
Err(why) => panic!("Could not open file: {}", why),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user