fix overwriting of prediction

This commit is contained in:
HF 2021-01-27 02:21:29 +01:00
parent 3762e74102
commit 0dd3d6352a
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ class Void extends WebSocketEvents {
return Math.floor(this.curRadius * 100 / TARGET_RADIUS);
}
broadcastPixelBuffer(canvasId, chunkid, buffer) {
broadcastPixelBuffer(canvasId, chunkId, buffer) {
const {
i: pi,
j: pj,

View File

@ -78,7 +78,7 @@ export function receivePixelUpdate(
offset: number,
color: ColorIndex,
) {
for (let p = 0; p < clientPredictions; p += 1) {
for (let p = 0; p < clientPredictions.length; p += 1) {
const predPxl = clientPredictions[p];
if (predPxl[0] === i
&& predPxl[1] === j