Skip to content

Commit ab1a0ee

Browse files
committed
fallableの速度が保存されていなかった
1 parent fc215de commit ab1a0ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/grid.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,14 +681,15 @@ export class Grid {
681681
cellBelow.block === Block.air ||
682682
cellBelow.block === Block.switch
683683
) {
684-
const { dy } = vsom;
684+
const { dy, dvy } = vsom;
685685
// fallableを1ブロック下に動かしdyを1blockSize分上げる
686686
this.setBlock(cx, x, cellY + 1, cell);
687687
this.setBlock(cx, x, cellY, { block: Block.air });
688688
cellY += 1;
689689
vsom = this.vsom[cellY][x];
690690
cell = cells[cellY][x];
691691
vsom.dy = dy - blockSize;
692+
vsom.dvy = dvy;
692693
} else {
693694
// 衝突したので止める
694695
vsom.dy = 0;

0 commit comments

Comments
 (0)