From dba2e102ab33a46b374ea42420e5215a9868e528 Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 26 Jun 2025 11:27:22 +0200 Subject: [PATCH] fix: moving into collisions, rather than preventing them --- src/game/tetromino/placing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/tetromino/placing.c b/src/game/tetromino/placing.c index b796a5d..e858b30 100644 --- a/src/game/tetromino/placing.c +++ b/src/game/tetromino/placing.c @@ -117,9 +117,9 @@ void place_update(struct gamedata* gdat, int movdat) { // update X axis tmp = !!(movdat & MOVL) - !!(movdat & MOVR); - gdat->pdat.sel[0] += (tmp && shape_intersects(gdat->rows, id, gdat->pdat.sel + (i8vec2){tmp, 0})) * tmp; + gdat->pdat.sel[0] += (tmp && !shape_intersects(gdat->rows, id, gdat->pdat.sel + (i8vec2){tmp, 0})) * tmp; // update roll tmp = id ^ (((!!(movdat & MOVRL) - !!(movdat & MOVRR)) * 8 + id) & 31); - gdat->pdat.nxt[idx] ^= (tmp && shape_intersects(gdat->rows, id ^ tmp, gdat->pdat.sel)) * tmp; + gdat->pdat.nxt[idx] ^= (tmp && !shape_intersects(gdat->rows, id ^ tmp, gdat->pdat.sel)) * tmp; }