From 63262053ee8502cb15a03be4a3a36f1fe1c7f8e6 Mon Sep 17 00:00:00 2001 From: cohrs Date: Wed, 3 Apr 2002 07:17:55 +0000 Subject: [PATCH] another pass at preserving the Burdened message - this is brute force, always update the status line each time you insert something into a container. If you look closely, you may still see the Burdened message disappears momentarily doe to the many possible messages between the freeinv() call and the point where the object is actually put into the container. --- src/pickup.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pickup.c b/src/pickup.c index 51d26e81f..31265091e 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1664,7 +1664,6 @@ STATIC_PTR int in_container(obj) register struct obj *obj; { - boolean is_gold = (obj->oclass == GOLD_CLASS); boolean floor_container = !carried(current_container); char buf[BUFSZ]; @@ -1792,13 +1791,17 @@ register struct obj *obj; } if (current_container) { - (void) add_to_container(current_container, obj); - current_container->owt = weight(current_container); - Strcpy(buf, the(xname(current_container))); You("put %s into %s.", doname(obj), buf); + + (void) add_to_container(current_container, obj); + current_container->owt = weight(current_container); } - if (is_gold) bot(); /* update gold piece count immediately */ + /* gold needs this, and freeinv() many lines above may cause + * the encumbrance to disappear from the status, so just always + * update status immediately. + */ + bot(); return(current_container ? 1 : -1); } -- 2.50.0