diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-18 21:09:28 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-18 21:09:28 -0500 |
commit | eb521a09fb44de23808653adbb6f0ede0fa5e9e0 (patch) | |
tree | 96d1ec0819d0e0a4c4a7ceb9a84f27a0cbb76752 | |
parent | 89ae45290d744469fbcbf192ebc468712ab3009d (diff) | |
parent | a66c8ade0ceba8ad4b6f84ffde258df1d0c689c3 (diff) |
Merge branch 'master' into 'jarvis'
-rw-r--r-- | socket.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -36,7 +36,7 @@ class Socket extends retryws { case 'write': this.emit('write', msg.accepted, msg.rejected); break; // A confirmation message for writes (accepted/rejected updates) case 'cursor': - this.emit('cursor', msg.positions, msg.sender); break; // Must be used for self-identification + this.emit('cursor', msg.positions.map(pos => [pos.tileY*8+pos.charY,pos.tileX*16+pos.charX]), msg.sender); break; // Must be used for self-identification case 'tileUpdate': this.emit('tileUpdate', msg.sender, msg.source, msg.tiles); break; // Any change by another user or possibly oneself case 'fetch': @@ -82,7 +82,7 @@ class Socket extends retryws { "tileY": Math.floor(coords[0]/8), "tileX": Math.floor(coords[1]/16), "charY": coords[0] % 8, - "charX": coords[0] % 16 + "charX": coords[1] % 16 } ] })); |