We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent add7479 commit 5491907Copy full SHA for 5491907
src/ability.ts
@@ -44,10 +44,9 @@ export function init(cx: Context): () => void {
44
export function focusCoord(cx: Context, player: Player) {
45
const { blockSize, marginY } = get(cx.config);
46
const middleX = Math.floor(player.x / blockSize);
47
- const outerBottomX = Math.floor((player.y - marginY) / blockSize);
48
49
- // 空中にブロックを置けないように
50
- const middleBlock = cx.grid.getBlock(cx, middleX, outerBottomX);
+ // 自分が空中にいる状態でブロックを置けないように
+ const middleBlock = cx.grid.getBlock(cx, middleX, getCoords(cx).y + 1);
51
const playerIsTryingToPlaceInAir = middleBlock === null;
52
if (playerIsTryingToPlaceInAir) {
53
return null;
0 commit comments