]> granicus.if.org Git - nethack/commit
detection/#terrain fix for u.uinwater
authorPatR <rankin@nethack.org>
Fri, 13 May 2016 01:00:29 +0000 (18:00 -0700)
committerPatR <rankin@nethack.org>
Fri, 13 May 2016 01:00:29 +0000 (18:00 -0700)
commit088c47a427b74a1618952897cafe732dc607b03e
tree8f0ad4ec7f44ef560880d4db52ec0a201e0ad90b
parent43df8c01303ab06e6f462d581376bb914575e497
detection/#terrain fix for u.uinwater

Discovered while working on an enhancement to #terrain....

Various detect magic (objects, food, &c) performed while underwater
temporarily removes the hero from the water in order to have access
to the regular map.  In 3.4.3, a hangup save during the detection
would leave the hero standing on top of the water.  3.6.0 added a
flag to track should-be-underwater so that during a hangup save the
hero could be put back in when going into the save file.  It also
added #terrain, another situation that uses the remove-from-water
hack while manipulating the map.

The flag wasn't being cleared after use, only during save, so normal
play without a hangup left it pending until next regular save.  The
result being that after restore, the hero would be considered to be
underwater again regardless of current location, and the map display
would be limited to a view of the adjacent spots as if underwater.
Then, any move--even using '.' to rest--would notice that the
'underwater' hero was not at a water location and put things back to
normal, with feedback of "you are on solid land again."  So to the
player, this would seem like a pair of map display and nonsequitor
message issues, not the internal logic one it actually is.
doc/fixes36.1
src/detect.c