diff options
-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 } ] })); |