From 4ccf17120b563416b3f855dc22ff1292d5f0808a Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Sat, 5 Sep 2020 17:47:33 -0600 Subject: [PATCH] Fix turning around when hitting a wall on an ice corner --- js/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/main.js b/js/main.js index f19b83d..14f53af 100644 --- a/js/main.js +++ b/js/main.js @@ -579,6 +579,13 @@ class Level { if (actor.slide_mode === 'ice') { // Actors on ice turn around when they hit something actor.direction = DIRECTIONS[direction].opposite; + // Somewhat clumsy hack: step on the ice tile again, so if it's + // a corner, it'll turn us in the correct direction + for (let tile of original_cell) { + if (tile.type.slide_mode === 'ice' && tile.type.on_arrive) { + tile.type.on_arrive(tile, this, actor); + } + } } return false; }