1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 03:09:59 +00:00

ray:: reordered just in case

This commit is contained in:
Zeno Rogue 2021-10-09 15:45:59 +02:00
parent 912aab9d27
commit 09f8aefba7

View File

@ -2196,14 +2196,18 @@ struct raycast_map {
forCellIdCM(c2, d, c) { forCellIdCM(c2, d, c) {
// if(reflect_val == 0 && !((1<<d) & legaldir[i])) continue; // if(reflect_val == 0 && !((1<<d) & legaldir[i])) continue;
if(intra::in && !intra::intra_id.count(c2)) intra::intra_id[c2] = intra::current;
if(intra::in) { if(intra::in) {
cellwalker cw(c, d); cellwalker cw(c, d);
auto p = at_or_null(intra::connections, cw); auto p = at_or_null(intra::connections, cw);
if(p) c2 = p->tcw.at; if(p) {
cell *c3 = p->tcw.at;
if(rays_generate && c3->mpdist > 7) { intra::may_switch_to(c3); setdist(c3, 7, c); intra::may_switch_to(c2); }
cl.add(c3);
}
} }
if(intra::in && !intra::intra_id.count(c2)) intra::intra_id[c2] = intra::current;
if(rays_generate) setdist(c2, 7, c); if(rays_generate) setdist(c2, 7, c);
/* if(!cl.listed(c2)) /* if(!cl.listed(c2))
legaldir.push_back(legaldir[i] &~ (1<<((d+3)%6)) ); */ legaldir.push_back(legaldir[i] &~ (1<<((d+3)%6)) ); */