1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

ray:: do not switch if no sample

This commit is contained in:
Zeno Rogue 2021-10-03 18:06:39 +02:00
parent 8385cad774
commit 36f3a0cf7b

View File

@ -1997,8 +1997,8 @@ struct raycast_map {
for(auto& p: sa) { for(auto& p: sa) {
int id = p.first; int id = p.first;
cell *c = p.second; cell *c = p.second;
intra::may_switch_to(c);
if(!c) continue; if(!c) continue;
intra::may_switch_to(c);
for(int j=0; j<c->type; j++) for(int j=0; j<c->type; j++)
ms[id+j] = protect_prod(currentmap->ray_iadj(c, j)); ms[id+j] = protect_prod(currentmap->ray_iadj(c, j));
if(WDIM == 2) for(int a: {0, 1}) { if(WDIM == 2) for(int a: {0, 1}) {