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
1 changed files with 1 additions and 1 deletions

View File

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