hangups with temp gold in inventory

- Implement Michael's suggestion of marking temp gold put in inventory
so it can be cleaned up during restore.
This commit is contained in:
cohrs
2002-05-21 05:04:09 +00:00
parent 40aef2b8e6
commit 94837b78d4
6 changed files with 64 additions and 47 deletions

View File

@@ -614,6 +614,7 @@ int retry;
/* Hack: gold is not in the inventory, so make a gold object
and put it at the head of the inventory list. */
u_gold = mkgoldobj(u.ugold); /* removes from u.ugold */
u_gold->in_use = TRUE;
u.ugold = u_gold->quan; /* put the gold back */
assigninvlet(u_gold); /* might end up as NOINVSYM */
u_gold->nobj = invent;
@@ -686,6 +687,7 @@ int retry;
/* didn't drop [all of] it */
u_gold = invent;
invent = u_gold->nobj;
u_gold->in_use = FALSE;
dealloc_obj(u_gold);
update_inventory();
}