fix: ex score was still wrong if running in valkyrie mode but without s-criticals

This commit is contained in:
Adamaq01 2023-07-24 01:36:15 +02:00
parent 5d898f168d
commit a1250a1fe8

View File

@ -1,11 +1,9 @@
use std::sync::atomic::Ordering;
use crate::types::game::GameScores;
use crate::types::tachi::{Difficulty, HitMeta, Import, ImportScore, Judgements, TachiLamp};
use crate::{helpers, CONFIGURATION, TACHI_IMPORT_URL};
use anyhow::Result;
use either::Either;
use log::info;
use crate::mikado::IS_VALKYRIE;
pub fn process_scores(scores: GameScores) -> Result<()> {
if scores.ref_id.is_none() {
@ -29,8 +27,6 @@ pub fn process_scores(scores: GameScores) -> Result<()> {
return Ok(());
};
let is_valkyrie = IS_VALKYRIE.load(Ordering::Relaxed);
let tracks = match scores.tracks {
Either::Left(track) => vec![track],
Either::Right(tracks) => tracks,
@ -59,7 +55,7 @@ pub fn process_scores(scores: GameScores) -> Result<()> {
fast: track.judge[0],
slow: track.judge[6],
max_combo: track.max_chain,
ex_score: if is_valkyrie || track.ex_score != 0 {
ex_score: if track.ex_score != 0 {
Some(track.ex_score)
} else {
None