Fix vision when opening a door

If a monster or hero opened a door with a temporary (poison) cloud
on it, the location could be seen through even with the cloud.
This commit is contained in:
Pasi Kallinen
2025-01-07 15:14:27 +02:00
parent 108d975694
commit b27c9102f6
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -911,7 +911,7 @@ doopen_indir(coordxy x, coordxy y)
} else } else
door->doormask = D_ISOPEN; door->doormask = D_ISOPEN;
feel_newsym(cc.x, cc.y); /* the hero knows she opened it */ feel_newsym(cc.x, cc.y); /* the hero knows she opened it */
unblock_point(cc.x, cc.y); /* vision: new see through there */ recalc_block_point(cc.x, cc.y); /* vision: new see through there */
} else { } else {
exercise(A_STR, TRUE); exercise(A_STR, TRUE);
set_msg_xy(cc.x, cc.y); set_msg_xy(cc.x, cc.y);
+1 -1
View File
@@ -1502,7 +1502,7 @@ postmov(
do { \ do { \
(where)->doormask = (what); \ (where)->doormask = (what); \
newsym((who)->mx, (who)->my); \ newsym((who)->mx, (who)->my); \
unblock_point((who)->mx, (who)->my); \ recalc_block_point((who)->mx, (who)->my); \
vision_recalc(0); \ vision_recalc(0); \
/* update cached value since it might change */ \ /* update cached value since it might change */ \
canseeit = didseeit || cansee((who)->mx, (who)->my); \ canseeit = didseeit || cansee((who)->mx, (who)->my); \