fix #K965 - dropped fragile items don't break
when the drop is being caused by encumbrance or punishment triggering a fall while going down stairs. Also, remove a couple instances of 'if (obj==GOLD) contexl.botl=TRUE' when dropping gold. They were held over from the obsolete !GOLDOBJ configuration. Both are immediately followed by freeinv() which calls freeinv_core() whichs starts off by setting the botl flag when taking gold out of inventory.
This commit is contained in:
@@ -980,12 +980,13 @@ litter()
|
||||
|
||||
for (otmp = g.invent; otmp; otmp = nextobj) {
|
||||
nextobj = otmp->nobj;
|
||||
if ((otmp != uball) && (rnd(capacity) <= (int) otmp->owt)) {
|
||||
if (otmp != uball && rnd(capacity) <= (int) otmp->owt) {
|
||||
if (canletgo(otmp, "")) {
|
||||
You("drop %s and %s %s down the stairs with you.",
|
||||
yname(otmp), (otmp->quan == 1L) ? "it" : "they",
|
||||
otense(otmp, "fall"));
|
||||
dropx(otmp);
|
||||
freeinv(otmp);
|
||||
hitfloor(otmp, FALSE);
|
||||
encumber_msg(); /* drop[xyz]() probably ought to to this... */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user