mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
rulegen:: a fixup for substates becoming a map
This commit is contained in:
parent
ae170378f5
commit
dbb02d6bc9
17
rulegen.cpp
17
rulegen.cpp
@ -1093,10 +1093,14 @@ void extend_analyzer(twalker cwmain, int z, twalker giver) {
|
|||||||
|
|
||||||
v->id = currently_at;
|
v->id = currently_at;
|
||||||
v->dir = sub_states[l]->dir;
|
v->dir = sub_states[l]->dir;
|
||||||
for(int i=0; i<10; i++) if(sub_states[l]->substates[i] == sub_states[l+1]) {
|
|
||||||
v = v->substates[i] = alloc_analyzer();
|
for(auto p: sub_states[l]->substates) {
|
||||||
currently_at = new_id++;
|
int i = p.first;
|
||||||
goto next_l;
|
if(sub_states[l]->substates[i] == sub_states[l+1]) {
|
||||||
|
v = v->substates[i] = alloc_analyzer();
|
||||||
|
currently_at = new_id++;
|
||||||
|
goto next_l;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
next_l: ;
|
next_l: ;
|
||||||
@ -1340,6 +1344,11 @@ EX void id_at_spin(twalker cw, vector<twalker>& sprawl, vector<analyzer_state*>&
|
|||||||
if(a->id == MYSTERY) {
|
if(a->id == MYSTERY) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(a->id >= isize(sprawl)) {
|
||||||
|
println(hlog, sprawl);
|
||||||
|
println(hlog, "id = ", a->id);
|
||||||
|
throw hr_exception("sprawl error");
|
||||||
|
}
|
||||||
auto t = sprawl[a->id];
|
auto t = sprawl[a->id];
|
||||||
twalker tw = t + a->dir;
|
twalker tw = t + a->dir;
|
||||||
ufind(tw);
|
ufind(tw);
|
||||||
|
Loading…
Reference in New Issue
Block a user