From: Pasi Kallinen Date: Thu, 26 Aug 2021 11:11:57 +0000 (+0300) Subject: Clear bypasses at beginning of main loop X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70b953db44ddf26da383fd90d484e507ce132a36;p=nethack Clear bypasses at beginning of main loop Object bypass flag is used to check if an object was already handled in an iteration loop, in cases where the linked list order may change during iteration. The flags should never stay set past a turn, if any were used. Reset the bypass flags at the beginning of the main loop, without checking g.context.move -flag; that flag gets reset if hero lifesaved. --- diff --git a/src/allmain.c b/src/allmain.c index 05e0e5a1f..65ee0bd91 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -153,6 +153,9 @@ moveloop_core(void) do_positionbar(); #endif + if (g.context.bypasses) + clear_bypasses(); + if (g.context.move) { /* actual time passed */ g.youmonst.movement -= NORMAL_SPEED; @@ -359,8 +362,6 @@ moveloop_core(void) if (iflags.hilite_delta) status_eval_next_unhilite(); #endif - if (g.context.bypasses) - clear_bypasses(); if (g.moves >= g.context.seer_turn) { if ((u.uhave.amulet || Clairvoyant) && !In_endgame(&u.uz) && !BClairvoyant)