as a temporary corridor is removed, set stone locations and adjacent spots to unlit; if player used scroll/wand/spell of light while inside the corridor, we don't want the light to reappear if/when a new tunnel goes through the same area */
| 120 | the corridor, we don't want the light to reappear if/when a new tunnel |
| 121 | goes through the same area */ |
| 122 | staticfn void |
| 123 | blackout(coordxy x, coordxy y) |
| 124 | { |
| 125 | struct rm *lev; |
| 126 | int i, j; |
| 127 | |
| 128 | for (i = x - 1; i <= x + 1; ++i) |
| 129 | for (j = y - 1; j <= y + 1; ++j) { |
| 130 | if (!isok(i, j)) |
| 131 | continue; |
| 132 | lev = &levl[i][j]; |
| 133 | /* [possible bug: when (i != x || j != y), perhaps we ought |
| 134 | to check whether the spot on the far side is lit instead |
| 135 | of doing a blanket blackout of adjacent locations] */ |
| 136 | if (lev->typ == STONE) |
| 137 | lev->lit = lev->waslit = 0; |
| 138 | /* mark <i,j> as not having been seen from <x,y> */ |
| 139 | unset_seenv(lev, x, y, i, j); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | staticfn void |
| 144 | restfakecorr(struct monst *grd) |
no test coverage detected