]> granicus.if.org Git - nethack/commitdiff
skip update_inventory during character init
authorPatR <rankin@nethack.org>
Thu, 23 Jun 2022 20:14:28 +0000 (13:14 -0700)
committerPatR <rankin@nethack.org>
Thu, 23 Jun 2022 20:14:28 +0000 (13:14 -0700)
With a debugging pline() in place, I could see that tty perm_invent
was being redrawn for each item added to hero's initial inventory.
Avoid that.  There is an update_inventory() call just prior to
entering moveloop() which handles all of starting invent as a unit.

src/invent.c

index d8b600bc795fdc34c92caed394426c2e694002c4..7d3677b410e2e8147f9a848559b311f2d4bf6c87 100644 (file)
@@ -2407,6 +2407,8 @@ update_inventory(void)
 {
     int save_suppress_price;
 
+    if (!g.program_state.in_moveloop) /* not covered by suppress_map_output */
+        return;
     if (suppress_map_output()) /* despite name, used for perm_invent too */
         return;