mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 23:50:27 +00:00
rulegen:: reinforced trace_root_path
This commit is contained in:
parent
523f640fa5
commit
ed156e9efb
@ -644,11 +644,15 @@ void trace_root_path(vector<int>& rp, twalker cw) {
|
|||||||
ufind(cw);
|
ufind(cw);
|
||||||
handle_distance_errors();
|
handle_distance_errors();
|
||||||
int di = side ? -1 : get_parent_dir(cw.at);
|
int di = side ? -1 : get_parent_dir(cw.at);
|
||||||
|
auto cw1 = cw;
|
||||||
|
ufind(cw);
|
||||||
|
if(cw != cw1) goto next;
|
||||||
for(int i=0; i<cw.at->type; i++) {
|
for(int i=0; i<cw.at->type; i++) {
|
||||||
if((!side) && (cw+i).spin != di) continue;
|
if((!side) && (cw+i).spin != di) continue;
|
||||||
tcell *c1 = (cw+i).peek();
|
tcell *c1 = (cw+i).peek();
|
||||||
if(!c1) continue;
|
if(!c1) continue;
|
||||||
be_solid(c1);
|
be_solid(c1);
|
||||||
|
handle_distance_errors();
|
||||||
if(c1->dist < d) {
|
if(c1->dist < d) {
|
||||||
rp.push_back(i);
|
rp.push_back(i);
|
||||||
cw += i;
|
cw += i;
|
||||||
|
Loading…
Reference in New Issue
Block a user