mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00: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
|
|
@ -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…
Add table
Add a link
Reference in a new issue