fix lint & improve kill log parse -> add friendlyFire default
parent
79aec147e3
commit
2fffad3c60
|
@ -127,6 +127,7 @@ const parseWarLog = (lineArray, war) => {
|
|||
const kill = {
|
||||
war: war._id,
|
||||
time: getFullTimeDate(war.date, line.split(WHITESPACE)[5]),
|
||||
friendlyFire: false,
|
||||
};
|
||||
if (shooter) {
|
||||
kill.shooter = shooter.name;
|
||||
|
|
|
@ -108,14 +108,14 @@ export class ServerStatsComponent implements OnInit, OnChanges {
|
|||
}
|
||||
|
||||
initializeChartData() {
|
||||
this.tmpAvgTimeline = ChartUtils.getMultiDataArray("min", "avg", "max");
|
||||
this.tmpMinTimeline = ChartUtils.getMultiDataArray("min", "avg", "max");
|
||||
this.tmpServerTimeline = ChartUtils.getMultiDataArray("min", "avg");
|
||||
this.tmpAvgTimeline = ChartUtils.getMultiDataArray('min', 'avg', 'max');
|
||||
this.tmpMinTimeline = ChartUtils.getMultiDataArray('min', 'avg', 'max');
|
||||
this.tmpServerTimeline = ChartUtils.getMultiDataArray('min', 'avg');
|
||||
|
||||
const diffMs = (new Date(this.war.endDate).getTime() - new Date(this.war.date).getTime());
|
||||
const warDurationMinutes = Math.round(diffMs / 60000);
|
||||
|
||||
let dateObj = new Date(this.war.date);
|
||||
const dateObj = new Date(this.war.date);
|
||||
dateObj.setHours(0);
|
||||
dateObj.setMinutes(1);
|
||||
|
||||
|
@ -126,11 +126,11 @@ export class ServerStatsComponent implements OnInit, OnChanges {
|
|||
const maxMinIdx = Math.min(this.performanceData.map(p => p.avgFps.length)
|
||||
.sort((a, b) => b - a)[0], warDurationMinutes);
|
||||
let tmpAvgArray = new Array(maxAvgIdx).fill(0);
|
||||
let tmpAvgMin = new Array(maxAvgIdx).fill(1000);
|
||||
let tmpAvgMax = new Array(maxAvgIdx).fill(0);
|
||||
const tmpAvgMin = new Array(maxAvgIdx).fill(1000);
|
||||
const tmpAvgMax = new Array(maxAvgIdx).fill(0);
|
||||
let tmpMinArray = new Array(maxMinIdx).fill(0);
|
||||
let tmpMinMin = new Array(maxMinIdx).fill(1000);
|
||||
let tmpMinMax = new Array(maxMinIdx).fill(0);
|
||||
const tmpMinMin = new Array(maxMinIdx).fill(1000);
|
||||
const tmpMinMax = new Array(maxMinIdx).fill(0);
|
||||
|
||||
this.performanceData.forEach((entry) => {
|
||||
if (entry.entityName !== 'SERVER') {
|
||||
|
|
Loading…
Reference in New Issue