fix #M107 - blindness and secret doors
From a bug report: zapping force bolt broke an adjacent potion of blindness (possibly carried by the monster he was attacking) which caused "it suddently gets dark" but further course of the bolt resulted in now blinded hero recieving "a door appears in the wall". make_blinded() was deferring vision recalculation until next pass through moveloop() (or until next pline()--if the "gets dark" message had been delivered after the call to make_blinded() instead of before, this wouldn't have been noticeable). Fix is trivial: just recalculate vision immediately when temporary blindness is toggled. [It might also be needed for involuntary blindfold removal, although I suspect that that is always accompanied by corresponding pline() which gets vision back into synch.]
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)vision.c 3.5 1999/02/18 */
|
||||
/* SCCS Id: @(#)vision.c 3.5 2005/06/15 */
|
||||
/* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -468,6 +468,8 @@ new_angle(lev, sv, row, col)
|
||||
* + Right before something is printed. [pline()]
|
||||
* + Right before we do a vision based operation. [do_clear_area()]
|
||||
* + screen redraw, so we can renew all positions in sight. [docrt()]
|
||||
* + When toggling temporary blindness, in case additional events
|
||||
* impacted by vision occur during the same move [make_blinded()]
|
||||
*
|
||||
* Control flag = 1. An adjacent vision recalculation. The hero has moved
|
||||
* one square. Knowing this, it might be possible to optimize the vision
|
||||
|
||||
Reference in New Issue
Block a user