mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-17 17:25:19 +01:00
Fix player name extraction for Unreal Tournament (1999) and possibly other gamespy1 games. (3.0.2)
This commit is contained in:
parent
fec5a1fac6
commit
1b11a132b9
3 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
### 3.0.2
|
||||
* Fix player name extraction for Unreal Tournament (1999) and possibly
|
||||
other gamespy1 games.
|
||||
|
||||
### 3.0.1
|
||||
* Clarified that nodejs 12 is now required for gamedig 3
|
||||
* Fixed misc player fields not going into `raw` subobject in `assettocorsa`, `fivem`, and `gamespy2`
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
],
|
||||
"main": "lib/index.js",
|
||||
"author": "GameDig Contributors",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/gamedig/node-gamedig.git"
|
||||
|
|
|
@ -37,10 +37,12 @@ class Gamespy1 extends Core {
|
|||
if (!(id in playersById)) playersById[id] = {};
|
||||
if (key === 'playername') {
|
||||
key = 'name';
|
||||
} else if (key === 'player') {
|
||||
key = 'name';
|
||||
} else if (key === 'team' && !isNaN(parseInt(value))) {
|
||||
key = 'teamId';
|
||||
value = parseInt(value);
|
||||
} else if (key === 'score' || key === 'ping' || key === 'deaths' || key === 'kills') {
|
||||
} else if (key === 'score' || key === 'ping' || key === 'deaths' || key === 'kills' || key === 'frags') {
|
||||
value = parseInt(value);
|
||||
}
|
||||
playersById[id][key] = value;
|
||||
|
|
Loading…
Reference in a new issue