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:
@@ -175,6 +175,8 @@ after "double trouble", cloned Wizard would wait until he had suffered some
|
|||||||
damage or hero moved into direct view; keep STRAT_WAIT for original
|
damage or hero moved into direct view; keep STRAT_WAIT for original
|
||||||
Wizard but avoid that for clones
|
Wizard but avoid that for clones
|
||||||
beyond turn 100000, prayer timeout is longer (scaling with game length)
|
beyond turn 100000, prayer timeout is longer (scaling with game length)
|
||||||
|
falling while going down stairs and dropping items due to encumbrance or
|
||||||
|
punishment wasn't subject fragile ones to breakage
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -980,12 +980,13 @@ litter()
|
|||||||
|
|
||||||
for (otmp = g.invent; otmp; otmp = nextobj) {
|
for (otmp = g.invent; otmp; otmp = nextobj) {
|
||||||
nextobj = otmp->nobj;
|
nextobj = otmp->nobj;
|
||||||
if ((otmp != uball) && (rnd(capacity) <= (int) otmp->owt)) {
|
if (otmp != uball && rnd(capacity) <= (int) otmp->owt) {
|
||||||
if (canletgo(otmp, "")) {
|
if (canletgo(otmp, "")) {
|
||||||
You("drop %s and %s %s down the stairs with you.",
|
You("drop %s and %s %s down the stairs with you.",
|
||||||
yname(otmp), (otmp->quan == 1L) ? "it" : "they",
|
yname(otmp), (otmp->quan == 1L) ? "it" : "they",
|
||||||
otense(otmp, "fall"));
|
otense(otmp, "fall"));
|
||||||
dropx(otmp);
|
freeinv(otmp);
|
||||||
|
hitfloor(otmp, FALSE);
|
||||||
encumber_msg(); /* drop[xyz]() probably ought to to this... */
|
encumber_msg(); /* drop[xyz]() probably ought to to this... */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
src/do.c
6
src/do.c
@@ -647,9 +647,6 @@ register struct obj *obj;
|
|||||||
ELevitation = W_ART; /* other than W_ARTI */
|
ELevitation = W_ART; /* other than W_ARTI */
|
||||||
if (flags.verbose)
|
if (flags.verbose)
|
||||||
You("drop %s.", doname(obj));
|
You("drop %s.", doname(obj));
|
||||||
/* Ensure update when we drop gold objects */
|
|
||||||
if (obj->oclass == COIN_CLASS)
|
|
||||||
g.context.botl = 1;
|
|
||||||
freeinv(obj);
|
freeinv(obj);
|
||||||
hitfloor(obj, TRUE);
|
hitfloor(obj, TRUE);
|
||||||
if (levhack)
|
if (levhack)
|
||||||
@@ -670,9 +667,6 @@ void
|
|||||||
dropx(obj)
|
dropx(obj)
|
||||||
register struct obj *obj;
|
register struct obj *obj;
|
||||||
{
|
{
|
||||||
/* Ensure update when we drop gold objects */
|
|
||||||
if (obj->oclass == COIN_CLASS)
|
|
||||||
g.context.botl = 1;
|
|
||||||
freeinv(obj);
|
freeinv(obj);
|
||||||
if (!u.uswallow) {
|
if (!u.uswallow) {
|
||||||
if (ship_object(obj, u.ux, u.uy, FALSE))
|
if (ship_object(obj, u.ux, u.uy, FALSE))
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ boolean verbose;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Object hits floor at hero's feet.
|
/* Object hits floor at hero's feet.
|
||||||
Called from drop(), throwit(), hold_another_object(). */
|
Called from drop(), throwit(), hold_another_object(), litter(). */
|
||||||
void
|
void
|
||||||
hitfloor(obj, verbosely)
|
hitfloor(obj, verbosely)
|
||||||
struct obj *obj;
|
struct obj *obj;
|
||||||
|
|||||||
Reference in New Issue
Block a user