From 398eab0dcb8c704a1b29d97b0fd182b5dff726d2 Mon Sep 17 00:00:00 2001 From: stambolievv Date: Wed, 19 Jan 2022 20:34:05 +0200 Subject: [PATCH] fix side type --- src/mechanics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mechanics.js b/src/mechanics.js index 97a67fb..3bb815f 100644 --- a/src/mechanics.js +++ b/src/mechanics.js @@ -75,7 +75,7 @@ function collision(AA, BB) { const crossHeight = heightHalf - Math.abs(diffY); /* Pass the value of the tile to check if its painful or not. */ - side.type = b.tileValue; + side.type = a.tileValue || b.tileValue; if (crossWidth > crossHeight) { if (diffY > 0) {