diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b7468..83e872e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/package.json b/package.json index 65010ab..cc51ee7 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/protocols/gamespy1.js b/protocols/gamespy1.js index 206bf54..d1d4934 100644 --- a/protocols/gamespy1.js +++ b/protocols/gamespy1.js @@ -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;