fix overwriting of prediction
This commit is contained in:
parent
3762e74102
commit
0dd3d6352a
|
@ -174,7 +174,7 @@ class Void extends WebSocketEvents {
|
||||||
return Math.floor(this.curRadius * 100 / TARGET_RADIUS);
|
return Math.floor(this.curRadius * 100 / TARGET_RADIUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcastPixelBuffer(canvasId, chunkid, buffer) {
|
broadcastPixelBuffer(canvasId, chunkId, buffer) {
|
||||||
const {
|
const {
|
||||||
i: pi,
|
i: pi,
|
||||||
j: pj,
|
j: pj,
|
||||||
|
|
|
@ -78,7 +78,7 @@ export function receivePixelUpdate(
|
||||||
offset: number,
|
offset: number,
|
||||||
color: ColorIndex,
|
color: ColorIndex,
|
||||||
) {
|
) {
|
||||||
for (let p = 0; p < clientPredictions; p += 1) {
|
for (let p = 0; p < clientPredictions.length; p += 1) {
|
||||||
const predPxl = clientPredictions[p];
|
const predPxl = clientPredictions[p];
|
||||||
if (predPxl[0] === i
|
if (predPxl[0] === i
|
||||||
&& predPxl[1] === j
|
&& predPxl[1] === j
|
||||||
|
|
Loading…
Reference in New Issue
Block a user