diff --git a/package.json b/package.json index f020b69..7cb16a4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cs2-react-hud", "private": true, - "version": "1.0.2", + "version": "1.0.3", "type": "module", "scripts": { "zip": "npm-build-zip", diff --git a/public/hud.json b/public/hud.json index 01f586e..1d437a1 100644 --- a/public/hud.json +++ b/public/hud.json @@ -1,6 +1,6 @@ { "name":"LHM CS2 Default HUD", - "version":"1.0.2", + "version":"1.0.3", "author":"Lexogrine", "legacy": false, "radar": true, diff --git a/src/HUD/Players/Player.tsx b/src/HUD/Players/Player.tsx index fc31275..f85f9ac 100644 --- a/src/HUD/Players/Player.tsx +++ b/src/HUD/Players/Player.tsx @@ -69,11 +69,14 @@ const arePlayersEqual = (playerOne: I.Player, playerTwo: I.Player) => { } const Player = ({ player, isObserved }: IProps) => { - const weapons = Object.values(player.weapons).map(weapon => ({ ...weapon, name: weapon.name.replace("weapon_", "") })); + const weapons = player.weapons.map(weapon => ({ ...weapon, name: weapon.name.replace("weapon_", "") })); const primary = weapons.filter(weapon => !['C4', 'Pistol', 'Knife', 'Grenade', undefined].includes(weapon.type))[0] || null; const secondary = weapons.filter(weapon => weapon.type === "Pistol")[0] || null; const grenades = weapons.filter(weapon => weapon.type === "Grenade"); const isLeft = player.team.orientation === "left"; + + const zeus = weapons.find(weapon => weapon.name === "taser"); + return (