From: Alex Smith Date: Wed, 5 Jan 2022 23:17:27 +0000 (+0000) Subject: Message fix for burden changes during end-of-turn updates X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2e0531b44aa8391be0a4135bdcbdfbb8c41f908;p=nethack Message fix for burden changes during end-of-turn updates This fixes the messages displayed when, e.g., the hero becomes unburdened as a consequence of a corpse rotting away. (There are no gameplay changes; the effective burden level is fixed between turns under both the old and new mechanisms, and any other use of it will recalculate it prior to using it.) Not changed: the interaction of overexert_hp with burden changes due to timeout. You were holding the corpse during your turn, so even if it rots away at the end of the turn, you can still pass out from the exertion you applied during that turn. --- diff --git a/src/allmain.c b/src/allmain.c index 1e0053a12..66a0dd69c 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -355,6 +355,14 @@ moveloop_core(void) /******************************************/ g.hero_seq++; /* moves*8 + n for n == 1..7 */ + + /* although we checked for encumberance above, we need to + check again for message purposes, as the weight of + inventory may have changed in, e.g., nh_timeout(); we do + need two checks here so that the player gets feedback + immediately if their own action encumbered them */ + encumber_msg(); + #ifdef STATUS_HILITES if (iflags.hilite_delta) status_eval_next_unhilite();