reset travel cache when changing levels
commit0c70b1bd0613a301223cc09fa4b6d21f7d30c2d6
authorPatR <rankin@nethack.org>
Sun, 29 May 2016 02:54:19 +0000 (28 19:54 -0700)
committerPatR <rankin@nethack.org>
Sun, 29 May 2016 02:54:19 +0000 (28 19:54 -0700)
tree2a5b5b5a0ba26d93c6030370e4d73452eb2baf21
parentea9a95d463b3e48c1edca4213788ac1c3fb8a145
reset travel cache when changing levels

When travel fails to reach its destination, it remembers the target
spot to use as default next time.  But that spot is only meaningful
on the current level.  Discard last travel destination when moving
to a different level.

Also, discard unlocking context when changing level unless the
context is for a container being brought along (after having been
picked up since you can't unlock a carried box).  Previously, a
door pointer on the new level could happen to match the last one
being unlocked on the old level.

Discard trap setting context when changing level even if the trap
object is brought along.

Somehow the code for applying a touchstone got inserted in between
two sections of code for applying a trap (ages ago; probably since
touchstone was first introduced however many versions back), so
clean that up.
doc/fixes36.1
include/extern.h
src/apply.c
src/do.c
src/lock.c