rulegen:: perform get_code if code is given but no parent_dir

This commit is contained in:
Zeno Rogue 2021-08-17 20:07:17 +02:00
parent 57dffb8af9
commit 858fd61794
1 changed files with 1 additions and 1 deletions

View File

@ -867,7 +867,7 @@ code_t id_at_spin(twalker cw) {
map<code_t, int> code_to_id;
EX pair<int, int> get_code(tcell *c) {
if(c->code != MYSTERY) {
if(c->code != MYSTERY && c->parent_dir != MYSTERY) {
int bestd = c->parent_dir;
if(bestd == -1) bestd = 0;
return {bestd, c->code};