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.
This commit is contained in:
@@ -1013,6 +1013,7 @@ E boolean FDECL(picking_lock, (int *, int *));
|
||||
E boolean FDECL(picking_at, (int, int));
|
||||
E void FDECL(breakchestlock, (struct obj *, BOOLEAN_P));
|
||||
E void NDECL(reset_pick);
|
||||
E void NDECL(maybe_reset_pick);
|
||||
E int FDECL(pick_lock, (struct obj *));
|
||||
E int NDECL(doforce);
|
||||
E boolean FDECL(boxlock, (struct obj *, struct obj *));
|
||||
|
||||
Reference in New Issue
Block a user