From 01e02d603b19f50ffc2582efc161535da561680f Mon Sep 17 00:00:00 2001 From: reschan Date: Sun, 26 Jun 2022 18:34:35 +0700 Subject: [PATCH] fix: unsafe connector rotation (for real this time) --- js/display_atree.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/display_atree.js b/js/display_atree.js index d83725e..d97ca36 100644 --- a/js/display_atree.js +++ b/js/display_atree.js @@ -279,28 +279,28 @@ function atree_get_state(connector) { if (atree_map.get(abil_name).display.col > parseInt(connector.split(",")[1])) { if (state) { connector_state[1] = 1; - } else if (!connector_state.right) { + } else if (!connector_state[1]) { connector_state[1] = 0; } } if (atree_map.get(abil_name).display.col < parseInt(connector.split(",")[1])) { if (state) { connector_state[0] = 1; - } else if (!connector_state.left) { + } else if (!connector_state[0]) { connector_state[0] = 0; } } if (atree_map.get(abil_name).display.row < parseInt(connector.split(",")[0])) { if (state) { connector_state[2] = 1; - } else if (!connector_state.up) { + } else if (!connector_state[2]) { connector_state[2] = 0; } } if (atree_map.get(abil_name).display.row > parseInt(connector.split(",")[0])) { if (state) { connector_state[3] = 1; - } else if (!connector_state.down) { + } else if (!connector_state[3]) { connector_state[3] = 0; }; };