1
0
mirror of synced 2024-11-14 10:17:37 +01:00

fix challenger meters difference

This commit is contained in:
ghkkk090 2022-08-26 14:01:23 +07:00
parent 7dc51897c5
commit 81b0c828dc
2 changed files with 30 additions and 3 deletions

View File

@ -198,11 +198,20 @@ export default class CarModule extends Module {
} }
}) })
let result = 0;
if(challengers.result > 0)
{
result = -Math.abs(challengers.result);
}
else{
result = Math.abs(challengers.result);
}
carsChallengers.push( carsChallengers.push(
wm.wm.protobuf.ChallengerCar.create({ wm.wm.protobuf.ChallengerCar.create({
car: carTarget!, car: carTarget!,
stamp: challengers.stamp, stamp: challengers.stamp,
result: challengers.result, result: result,
area: challengers.area area: challengers.area
}) })
); );

View File

@ -126,11 +126,20 @@ export default class GhostModule extends Module {
} }
}) })
let result = 0;
if(challengers[i].result > 0)
{
result = -Math.abs(challengers[i].result);
}
else{
result = Math.abs(challengers[i].result);
}
carsChallenger.push( carsChallenger.push(
wm.wm.protobuf.ChallengerCar.create({ wm.wm.protobuf.ChallengerCar.create({
car: carTarget!, car: carTarget!,
stamp: challengers[i].stamp, stamp: challengers[i].stamp,
result: challengers[i].result, result: result,
area: challengers[i].area area: challengers[i].area
}) })
); );
@ -218,11 +227,20 @@ export default class GhostModule extends Module {
} }
}) })
let result = 0;
if(challengers[i].result > 0)
{
result = -Math.abs(challengers[i].result);
}
else{
result = Math.abs(challengers[i].result);
}
carsChallenger.push( carsChallenger.push(
wm.wm.protobuf.ChallengerCar.create({ wm.wm.protobuf.ChallengerCar.create({
car: carTarget!, car: carTarget!,
stamp: challengers[i].stamp, stamp: challengers[i].stamp,
result: challengers[i].result, result: result,
area: challengers[i].area area: challengers[i].area
}) })
); );