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.
This commit is contained in:
13
src/pickup.c
13
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user