Add vision sanity checking, fix more vision
- Add a vision sanity checking routine - Recalc block point when digging a door for temporary clouds - Add recalc_block_point after cvt_sdoor_to_door, because doorways on the Rogue level have no doors, and otherwise the sanity checking would complain. This doesn't actually change how the Rogue level vision works, as it uses a different vision system - Monster using a trap in a secret corridor revealed the corridor, but didn't unblock the vision unless you saw the location
This commit is contained in:
@@ -100,6 +100,15 @@ staticfn void rogue_vision(seenV **, coordxy *, coordxy *);
|
||||
#define sign(z) ((z) < 0 ? -1 : ((z) ? 1 : 0))
|
||||
#define v_abs(z) ((z) < 0 ? -(z) : (z)) /* don't use abs -- it may exist */
|
||||
|
||||
/* expose viz_clear[][] for sanity checking */
|
||||
boolean
|
||||
get_viz_clear(int x, int y)
|
||||
{
|
||||
if (isok(x,y) && !viz_clear[y][x])
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* vision_init()
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user