Fold invisible glyph unmapping into single function

This commit is contained in:
Pasi Kallinen
2017-10-07 16:24:49 +03:00
parent f8760093cc
commit 4b7aea0eac
8 changed files with 27 additions and 42 deletions

View File

@@ -219,11 +219,8 @@ int expltype;
}
if (mtmp && cansee(i + x - 1, j + y - 1) && !canspotmon(mtmp))
map_invisible(i + x - 1, j + y - 1);
else if (!mtmp && glyph_is_invisible(
levl[i + x - 1][j + y - 1].glyph)) {
unmap_object(i + x - 1, j + y - 1);
newsym(i + x - 1, j + y - 1);
}
else if (!mtmp)
(void) unmap_invisible(i + x - 1, j + y - 1);
if (cansee(i + x - 1, j + y - 1))
visible = TRUE;
if (explmask[i][j] == 1)