aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorneauoire <[email protected]>2019-11-24 09:03:43 -0500
committerneauoire <[email protected]>2019-11-24 09:03:43 -0500
commit657780de518c9b59a06fd9135ac843354ccb952a (patch)
treef7a89eb415a15f8dda13974eaad34b403853e485
parentfe1803bc4e6ea476a0ad55cb3c539c7cc3053fcd (diff)
downloadOrca-657780de518c9b59a06fd9135ac843354ccb952a.tar.gz
Orca-657780de518c9b59a06fd9135ac843354ccb952a.zip
Fixed UDP bug and re-add ports hints
-rw-r--r--desktop/sources/scripts/core/io/udp.js1
-rw-r--r--desktop/sources/scripts/cursor.js2
2 files changed, 2 insertions, 1 deletions
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'
}