From d3067173d66218e06cce96b470b8eec10a46a02d Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 24 Dec 2020 08:01:43 -0700 Subject: [PATCH] Don't search for an exit direction from the red teleporter you entered --- js/tiletypes.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/tiletypes.js b/js/tiletypes.js index 4c5cac5..60542fa 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -1261,8 +1261,12 @@ const TILE_TYPES = { } let exit_direction = other.direction; for (let tile of iterable) { - if (tile === me || this._is_active(tile, level)) { - // Red teleporters allow exiting in any direction, searching clockwise + // Red teleporters allow exiting in any direction, searching clockwise, except for + // the teleporter you entered + if (tile === me) { + yield [tile, exit_direction]; + } + else if (this._is_active(tile, level)) { yield [tile, exit_direction]; yield [tile, DIRECTIONS[exit_direction].right]; yield [tile, DIRECTIONS[exit_direction].opposite];