Skip to content

Commit

Permalink
try fixing teamfights
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Feb 20, 2024
1 parent 9175df8 commit cf8994b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion processors/processTeamfights.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ function processTeamfights(entries, meta) {
}
} else if (e.type === 'ability_uses' || e.type === 'item_uses') {
// count skills, items
populate(e, tf);
// console.log(e);
// Using slot directly as index appears to be incorrect for these fields as of 2024 (see processExpand)
// So just compute an index based on player_slot
const computedSlot = e.player_slot % (128 - 5);
tf.players[computedSlot][e.type][e.key] = (tf.players[computedSlot][e.type][e.key] ?? 0) + 1;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#curl localhost:5600 --data-binary "@/datadrive/odota-parser/7355186741_1742953546.dem"
#curl localhost:5600 --data-binary "@/datadrive/odota-parser/7437280975_580771917.dem"

curl localhost:5600/blob?replay_url=http://replay152.valve.net/570/7503212404_1277518156.dem.bz2
curl localhost:5600/blob?replay_url=http://replay153.valve.net/570/7580803996_2070517572.dem.bz2

0 comments on commit cf8994b

Please sign in to comment.