1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-30 03:50:34 +00:00

rulegen:: reinforced trace_root_path

This commit is contained in:
Zeno Rogue 2021-11-01 17:21:50 +01:00
parent 523f640fa5
commit ed156e9efb

View File

@ -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;