mirror of
https://github.com/demostf/demo.js
synced 2026-06-03 16:44:12 +02:00
fix kill user ids to
This commit is contained in:
parent
ab7807c356
commit
77f1006259
2 changed files with 10 additions and 1 deletions
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
9
state.js
9
state.js
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue