Skip to content

Commit

Permalink
fix single pixel addPixel packets not working properly
Browse files Browse the repository at this point in the history
  • Loading branch information
be195 authored Apr 23, 2024
1 parent be201d6 commit ce3903a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/structures/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class Game extends BaseStructure {
public onSocketAddPixel(socket: WebSocket, { pixels, steamId, x, y, color }) {
if (!socket.hasWriteAccess) return;

if (x && y && color) {
if (x !== undefined && y !== undefined && color !== undefined) {
const xy = y * this.dimensions[0] + x;
pixels = { [xy]: color }
}
Expand Down

0 comments on commit ce3903a

Please sign in to comment.