1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-04 00:54:14 +02:00

fix kill user ids to

This commit is contained in:
Robin Appelman 2015-09-04 20:46:30 +02:00
commit 77f1006259
2 changed files with 10 additions and 1 deletions

View file

@ -1,7 +1,7 @@
{
"name": "tf2-demo",
"description": "A parser for TF2 demo files",
"version": "0.2.2",
"version": "0.2.3",
"bin": {
"demo-analyse": "./bin/analyse.js"
},

View file

@ -53,6 +53,15 @@ State.prototype.updateState = function (packet) {
case 'player_death':
// todo get player names, not same id as the name string table
var assister = packet.event.values.assister < 32 ? packet.event.values.assister : null;
if (assister > 256) {
assister -= 256;
}
if (packet.event.values.attacker > 256) {
packet.event.values.attacker -= 256;
}
if (packet.event.values.userid > 256) {
packet.event.values.userid -= 256;
}
this.state.deaths.push({
killer : packet.event.values.attacker,
assister: assister,