From 657780de518c9b59a06fd9135ac843354ccb952a Mon Sep 17 00:00:00 2001 From: neauoire Date: Sun, 24 Nov 2019 09:03:43 -0500 Subject: Fixed UDP bug and re-add ports hints --- desktop/sources/scripts/core/io/udp.js | 1 + desktop/sources/scripts/cursor.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/sources/scripts/core/io/udp.js b/desktop/sources/scripts/core/io/udp.js index e94ff64..615adf1 100644 --- a/desktop/sources/scripts/core/io/udp.js +++ b/desktop/sources/scripts/core/io/udp.js @@ -47,6 +47,7 @@ function Udp (client) { } this.play = function (data) { + if (!this.socket) { return } this.socket.send(Buffer.from(`${data}`), this.port, client.io.ip, (err) => { if (err) { console.warn(err) } }) diff --git a/desktop/sources/scripts/cursor.js b/desktop/sources/scripts/cursor.js index b03bfad..8b30f8f 100644 --- a/desktop/sources/scripts/cursor.js +++ b/desktop/sources/scripts/cursor.js @@ -107,9 +107,9 @@ function Cursor (client) { this.inspect = () => { if (this.w !== 0 || this.h !== 0) { return 'multi' } - if (client.orca.lockAt(this.x, this.y)) { return 'locked' } const port = client.portAt(this.x, this.y) if (port) { return `${port[3]}` } + if (client.orca.lockAt(this.x, this.y)) { return 'locked' } return 'empty' } -- cgit v1.2.3