#tip horn of plenty (trunk only)
Bug in #tip handling for horn of plenty. Emptying one while levitating would trigger an "obj not free" panic by flooreffects() due to following hitfloor() with redundant/inappropriate dropy().
This commit is contained in:
18
src/mkobj.c
18
src/mkobj.c
@@ -1815,14 +1815,16 @@ boolean tipping; /* caller emptying entire contents; affects shop handling */
|
|||||||
(const char *)0);
|
(const char *)0);
|
||||||
} else {
|
} else {
|
||||||
/* assumes this is taking place at hero's location */
|
/* assumes this is taking place at hero's location */
|
||||||
if (!can_reach_floor(TRUE))
|
if (!can_reach_floor(TRUE)) {
|
||||||
hitfloor(obj);
|
hitfloor(obj); /* does altar check, message, drop */
|
||||||
else if (IS_ALTAR(levl[u.ux][u.uy].typ))
|
} else {
|
||||||
doaltarobj(obj);
|
if (IS_ALTAR(levl[u.ux][u.uy].typ))
|
||||||
else
|
doaltarobj(obj); /* does its own drop message */
|
||||||
pline("%s %s to the %s.", Doname2(obj),
|
else
|
||||||
otense(obj, "drop"), surface(u.ux, u.uy));
|
pline("%s %s to the %s.", Doname2(obj),
|
||||||
dropy(obj);
|
otense(obj, "drop"), surface(u.ux, u.uy));
|
||||||
|
dropy(obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (horn->dknown) makeknown(HORN_OF_PLENTY);
|
if (horn->dknown) makeknown(HORN_OF_PLENTY);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user