From 2371bed5416d8f98c04a6234169a9e177b7c2b71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:47:42 +0000 Subject: [PATCH 1/6] Bump ws from 7.5.9 to 7.5.10 in /src Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10) --- updated-dependencies: - dependency-name: ws dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- src/package-lock.json | 8 ++++---- src/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 291e1c2..630f246 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1,6 +1,6 @@ { "name": "boltobserv", - "version": "1.4.0", + "version": "1.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3188,9 +3188,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==" }, "xmlbuilder": { "version": "15.1.1", diff --git a/src/package.json b/src/package.json index 7739369..f691f17 100644 --- a/src/package.json +++ b/src/package.json @@ -21,6 +21,6 @@ "express": "^4.18.2", "json5": "^2.2.3", "steam-game-path": "^2.2.0", - "ws": "^7.5.9" + "ws": "^7.5.10" } } From 99c58ff2eb4d47b7be4fbe6640eba77ac628437d Mon Sep 17 00:00:00 2001 From: Moyomo Date: Fri, 28 Jun 2024 14:35:27 +0200 Subject: [PATCH 2/6] Fixed smoke gap position calculation --- src/renderers/smokes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderers/smokes.js b/src/renderers/smokes.js index b76fe65..4f6435a 100644 --- a/src/renderers/smokes.js +++ b/src/renderers/smokes.js @@ -98,8 +98,8 @@ socket.element.addEventListener("explosion", event => { gapElement.id = "gap" + event.data.id // Calculate gap position within smoke - gapElement.style.left = (smokeX - pos.x) / smokeSize * 100 + "%" - gapElement.style.bottom = (smokeY - pos.y) / smokeSize * 100 + "%" + gapElement.style.left = (pos.x - smokeX) / smokeSize * 100 + "%" + gapElement.style.bottom = (pos.y - smokeY) / smokeSize * 100 + "%" // Insert gap into smoke smokeElement.appendChild(gapElement) From b84ba001a6cd1164947244968dbff22c38d0324e Mon Sep 17 00:00:00 2001 From: Moyomo Date: Fri, 28 Jun 2024 14:41:47 +0200 Subject: [PATCH 3/6] Fixed HE grenades not being drawn The second and third trail part have the same position, causing the projectile opacity to get set to 0 right after throwing --- src/renderers/projectiles.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderers/projectiles.js b/src/renderers/projectiles.js index a38ddad..2aa4983 100644 --- a/src/renderers/projectiles.js +++ b/src/renderers/projectiles.js @@ -58,8 +58,8 @@ socket.element.addEventListener("projectiles", event => { if (projectile.type == 'frag') { // Get the previous coords from the let trailParts = trailElement.getAttributeNS(null, "d").split(" ") - // True if more than two packets are known and nade stationary - let isStationary = trailParts.length > 6 + // True if more than three packets are known and nade stationary + let isStationary = trailParts.length > 9 // Go through each nade position from last to newest, max last 5 for (let i = trailParts.length - 1; i > 2 && trailParts.length - i < 5 * 3; i -= 3) { From 8ccc17904b0cc7b0063fbc9242840c4364e5dea8 Mon Sep 17 00:00:00 2001 From: Moyomo Date: Fri, 28 Jun 2024 14:46:42 +0200 Subject: [PATCH 4/6] Removed old bugfix for wrong molotov fire coordinates Apparently this got fixed in a game update and the flame coordinates are not doubled anymore --- src/gsi.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gsi.js b/src/gsi.js index d5e2aef..7278de8 100644 --- a/src/gsi.js +++ b/src/gsi.js @@ -177,10 +177,9 @@ function handleRequest(req, res) { for (var i = 0; i < flamesNum; i++) { let pos = Object.values(nade.flames)[i].split(", ") flamesPos.push({ - // BUG: CS2 has the coords doubled for some reason - x: parseFloat(pos[0]) / 2, - y: parseFloat(pos[1]) / 2, - z: parseFloat(pos[2]) / 2 + x: parseFloat(pos[0]), + y: parseFloat(pos[1]), + z: parseFloat(pos[2]) }) } From e06812f65434d6d341f3945b54c1315b61597c2c Mon Sep 17 00:00:00 2001 From: boltgolt Date: Wed, 11 Sep 2024 19:30:57 +0200 Subject: [PATCH 5/6] Add option to set tombstone opacity per #63 --- src/config/config.json5 | 4 +++- src/css/map.css | 9 +++++++-- src/renderers/_init.js | 10 ++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/config/config.json5 b/src/config/config.json5 index 118481c..1a1efe7 100644 --- a/src/config/config.json5 +++ b/src/config/config.json5 @@ -4,7 +4,7 @@ // without making changes here. This makes your config a lot more portable. { - "_version": "1.3.0", + "_version": "1.5.1", // Settings related to the Boltobserv window "window": { @@ -99,6 +99,8 @@ "playerSmoothing": 13, // Frames to smooth out flying projectile movement "projectileSmoothing": 5, + // Opacity between 0 and 1 of the dead player crosses, set to 0 to fully hide + "tombstoneOpacity": 0.4, // Amount of scaling to apply to player dots on the radar // Values above 1 might be blurry diff --git a/src/css/map.css b/src/css/map.css index 8ef27bc..a91f04a 100644 --- a/src/css/map.css +++ b/src/css/map.css @@ -1,3 +1,8 @@ +:root { + --config-tombstone-opacity: .4; + --config-bomb-dot-scale: .7; +} + body { overflow: hidden; } @@ -120,11 +125,11 @@ div.dot.flashed.active { } div.dot.dead { - opacity: .4; color: transparent; text-shadow: none; border-radius: 0; clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%); + opacity: var(--config-tombstone-opacity); z-index: 13 !important; filter: none; } @@ -186,7 +191,7 @@ div.label span { width: 2.2vmin; bottom: -30%; left: -30%; - transform: translate(-50%, 50%); + transform: scale(var(--config-bomb-dot-scale)) translate(-50%, 50%); transform-origin: bottom left; } diff --git a/src/renderers/_init.js b/src/renderers/_init.js index 7a655a5..21edcc6 100644 --- a/src/renderers/_init.js +++ b/src/renderers/_init.js @@ -52,11 +52,13 @@ socket.element.addEventListener("welcome", event => { } } - // Do the same for the bomb icon - document.getElementById("bomb").style.transform = `scale(${event.data.config.radar.bombDotScale}) translate(-50%, 50%)` + // Insert stylesheet into head to apply some CSS setings from config + document.documentElement.style.setProperty("--config-tombstone-opacity", event.data.config.radar.tombstoneOpacity) + document.documentElement.style.setProperty("--config-bomb-dot-scale", event.data.config.radar.bombDotScale) }) -if(socket.native && socket.native.readyNumber === 1){ - socket.native.send("requestWelcome"); + +if (socket.native && socket.native.readyNumber === 1) { + socket.native.send("requestWelcome") } window.addEventListener("DOMContentLoaded", () => { From f056f88804a42df09abd26e35f0dface7cba1f25 Mon Sep 17 00:00:00 2001 From: boltgolt Date: Wed, 11 Sep 2024 19:36:29 +0200 Subject: [PATCH 6/6] Bump version --- package.json | 2 +- src/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 14b1cbf..bbd58b8 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name": "boltobserv", - "version": "1.5.0", + "version": "1.5.1", "_whatisthis": "Older versions of Boltobserv used this file to check for updates, so it can't be deleted. The real package.json is in /src" } diff --git a/src/package.json b/src/package.json index f691f17..6b36d1d 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "boltobserv", - "version": "1.5.0", + "version": "1.5.1", "description": "External radar for CSGO observers", "main": "index.js", "homepage": "https://github.com/boltgolt/boltobserv/",