Fixed post swing values, requires HttpSiraStatus update

This commit is contained in:
Liam 2022-10-12 13:25:48 +01:00
parent 4af5f462ed
commit babfa22ff8

@ -248,6 +248,8 @@ export default class Overlay extends Component {
"noteFullyCut": (data) => { "noteFullyCut": (data) => {
const { noteCut } = data; const { noteCut } = data;
console.log(noteCut)
// Left Saber // Left Saber
if (noteCut.saberType === 'SaberA') { if (noteCut.saberType === 'SaberA') {
const data = this.state.leftHand; const data = this.state.leftHand;
@ -260,8 +262,8 @@ export default class Overlay extends Component {
if (data.averagePostSwing.includes(30) && data.averagePostSwing.length === 1) { if (data.averagePostSwing.includes(30) && data.averagePostSwing.length === 1) {
data.averagePostSwing = []; data.averagePostSwing = [];
} }
data.averagePreSwing.push(noteCut.initialScore > 70 ? 70 : noteCut.initialScore); data.averagePreSwing.push(noteCut.beforeSwingRating * 70);
data.averagePostSwing.push(noteCut.finalScore - noteCut.initialScore); data.averagePostSwing.push(noteCut.afterSwingRating * 30);
data.averageCut.push(noteCut.cutDistanceScore); data.averageCut.push(noteCut.cutDistanceScore);
this.setState({ leftHand: data }); this.setState({ leftHand: data });
} }
@ -278,8 +280,8 @@ export default class Overlay extends Component {
if (data.averagePostSwing.includes(30) && data.averagePostSwing.length === 1) { if (data.averagePostSwing.includes(30) && data.averagePostSwing.length === 1) {
data.averagePostSwing = []; data.averagePostSwing = [];
} }
data.averagePreSwing.push(noteCut.initialScore > 70 ? 70 : noteCut.initialScore); data.averagePreSwing.push(noteCut.beforeSwingRating * 70);
data.averagePostSwing.push(noteCut.finalScore - noteCut.initialScore); data.averagePostSwing.push(noteCut.afterSwingRating * 30);
data.averageCut.push(noteCut.cutDistanceScore); data.averageCut.push(noteCut.cutDistanceScore);
this.setState({ rightHand: data }); this.setState({ rightHand: data });
} }