Skip to content

Commit

Permalink
Merge pull request #3 from PhlexPlexico/master
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
Iwhite67 authored May 20, 2024
2 parents b071b7c + e89bdd2 commit 35e0e59
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
Binary file added public/img/maps/de_anubis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 17 additions & 8 deletions src/components/PlayerStatTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,9 @@ export default {
if (typeof serverResponse == "string") return;
let allMapIds = [];
let totalMatchTeam = [];
let allTeamIds = [];
serverResponse.filter(item => {
let i = allMapIds.findIndex(x => x == item.map_id);
let j = allTeamIds.findIndex(x => x == item.team_id);
if (i <= -1) allMapIds.push(item.map_id);
if (j <= -1) allTeamIds.push(item.team_id);
return null;
});
allMapIds.forEach(map_id => {
Expand Down Expand Up @@ -284,11 +281,23 @@ export default {
let hsp = this.GetHSP(player);
let kdr = this.GetKDR(player);
let fpr = this.GetFPR(player);
let teamNum = player.team_id == matchData.team1_id ? 1 : 2;
let newName =
player.team_id == matchData.team1_id
? matchData.team1_string
: matchData.team2_string;
let teamNum;
let newName;
if (player.team_id) {
teamNum = player.team_id == matchData.team1_id ? 1 : 2;
newName =
player.team_id == matchData.team1_id
? matchData.team1_string
: matchData.team2_string;
} else {
// If we don't have a team ID, we must be pugging. Go based on
// Team strings alone.
teamNum = player.team_name == matchData.team1_string ? 1 : 2;
newName =
player.team_name == matchData.team1_string
? matchData.team1_string
: matchData.team2_string;
}
this.$set(
this.playerstats[idx][pIdx],
"Team",
Expand Down

0 comments on commit 35e0e59

Please sign in to comment.