Fix vision in some cases with boulder falling into pool
We can't just unconditionally unblock vision for a location when a boulder falls into a pool, because the location may also have a (poison) cloud on it.
This commit is contained in:
@@ -3508,6 +3508,7 @@ extern void vision_reset(void);
|
||||
extern void vision_recalc(int);
|
||||
extern void block_point(int, int);
|
||||
extern void unblock_point(int, int);
|
||||
extern void recalc_block_point(coordxy, coordxy);
|
||||
extern boolean clear_path(int, int, int, int);
|
||||
extern void do_clear_area(coordxy, coordxy, int,
|
||||
void(*)(coordxy, coordxy, void *), genericptr_t);
|
||||
|
||||
2
src/do.c
2
src/do.c
@@ -74,8 +74,8 @@ boulder_hits_pool(
|
||||
levl[rx][ry].drawbridgemask &= ~DB_UNDER; /* clear lava */
|
||||
levl[rx][ry].drawbridgemask |= DB_FLOOR;
|
||||
} else {
|
||||
unblock_point(rx, ry);
|
||||
levl[rx][ry].typ = ROOM, levl[rx][ry].flags = 0;
|
||||
recalc_block_point(rx, ry);
|
||||
}
|
||||
/* 3.7: normally DEADMONSTER() is used when traversing the fmon
|
||||
list--dead monsters usually aren't still at specific map
|
||||
|
||||
12
src/vision.c
12
src/vision.c
@@ -887,7 +887,17 @@ unblock_point(int x, int y)
|
||||
gv.vision_full_recalc = 1;
|
||||
}
|
||||
|
||||
/*==========================================================================*\
|
||||
/* recalc if point should be blocked or unblocked */
|
||||
void
|
||||
recalc_block_point(coordxy x, coordxy y)
|
||||
{
|
||||
if (does_block(x, y, &levl[x][y]))
|
||||
block_point(x, y);
|
||||
else
|
||||
unblock_point(x, y);
|
||||
}
|
||||
|
||||
/*==========================================================================* \
|
||||
: :
|
||||
: Everything below this line uses (y,x) instead of (x,y) --- the :
|
||||
: algorithms are faster if they are less recursive and can scan :
|
||||
|
||||
Reference in New Issue
Block a user