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:
@@ -243,6 +243,13 @@ boolean talk;
|
||||
if (u_could_see ^ can_see_now) { /* one or the other but not both */
|
||||
context.botl = 1;
|
||||
vision_full_recalc = 1; /* blindness just got toggled */
|
||||
/* this vision recalculation used to be deferred until
|
||||
moveloop(), but that made it possible for vision
|
||||
irregularities to occur (cited case was force bolt
|
||||
hitting adjacent potion of blindness and then a
|
||||
secret door; hero was blinded by vapors but then
|
||||
got the message "a door appears in the wall") */
|
||||
vision_recalc(0);
|
||||
if (Blind_telepat || Infravision) see_monsters();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user