1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

ray:: do not create through walls

This commit is contained in:
Zeno Rogue 2019-11-02 10:41:42 +01:00
parent 72789f5a52
commit add21e134a

View File

@ -715,9 +715,11 @@ EX void cast() {
if(true) { if(true) {
manual_celllister cl; manual_celllister cl;
cl.add(cs); cl.add(cs);
bool optimize = !isWall3(cs);
for(int i=0; i<isize(cl.lst); i++) { for(int i=0; i<isize(cl.lst); i++) {
cell *c = cl.lst[i]; cell *c = cl.lst[i];
if(racing::on && i > 0 && c->wall == waBarrier) continue; if(racing::on && i > 0 && c->wall == waBarrier) continue;
if(optimize && isWall3(c)) continue;
forCellCM(c2, c) { forCellCM(c2, c) {
if(rays_generate) setdist(c2, 7, c); if(rays_generate) setdist(c2, 7, c);
cl.add(c2); cl.add(c2);