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
|
@ -1,3 +1,7 @@
|
||||||
|
### 3.0.2
|
||||||
|
* Fix player name extraction for Unreal Tournament (1999) and possibly
|
||||||
|
other gamespy1 games.
|
||||||
|
|
||||||
### 3.0.1
|
### 3.0.1
|
||||||
* Clarified that nodejs 12 is now required for gamedig 3
|
* Clarified that nodejs 12 is now required for gamedig 3
|
||||||
* Fixed misc player fields not going into `raw` subobject in `assettocorsa`, `fivem`, and `gamespy2`
|
* Fixed misc player fields not going into `raw` subobject in `assettocorsa`, `fivem`, and `gamespy2`
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
],
|
],
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"author": "GameDig Contributors",
|
"author": "GameDig Contributors",
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/gamedig/node-gamedig.git"
|
"url": "https://github.com/gamedig/node-gamedig.git"
|
||||||
|
|
|
@ -37,10 +37,12 @@ class Gamespy1 extends Core {
|
||||||
if (!(id in playersById)) playersById[id] = {};
|
if (!(id in playersById)) playersById[id] = {};
|
||||||
if (key === 'playername') {
|
if (key === 'playername') {
|
||||||
key = 'name';
|
key = 'name';
|
||||||
|
} else if (key === 'player') {
|
||||||
|
key = 'name';
|
||||||
} else if (key === 'team' && !isNaN(parseInt(value))) {
|
} else if (key === 'team' && !isNaN(parseInt(value))) {
|
||||||
key = 'teamId';
|
key = 'teamId';
|
||||||
value = parseInt(value);
|
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);
|
value = parseInt(value);
|
||||||
}
|
}
|
||||||
playersById[id][key] = value;
|
playersById[id][key] = value;
|
||||||
|
|
Loading…
Reference in New Issue