Don't search for an exit direction from the red teleporter you entered
This commit is contained in:
1 parent
afe68e1b20
commit
d3067173d6
1 file changed
+6
-2
+6
-2
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user