chore(protocol/gamespy3): replace if condition many ors with includes

This commit is contained in:
CosminPerRam 2025-06-09 23:28:29 +03:00
parent 7c774ac403
commit c671d5ddf2

View file

@ -122,7 +122,7 @@ export default class gamespy3 extends Core {
let value = playerInfo[from]
if (key === 'player') key = 'name'
if (key === 'score' || key === 'ping' || key === 'team' || key === 'deaths' || key === 'pid') value = parseInt(value)
if (['score', 'ping', 'team', 'deaths', 'pid'].includes(key)) value = parseInt(value)
player[key] = value
}
state.players.push(player)