ensure tmp_at() structures are initialized for all code paths when swallowed

This commit is contained in:
nhmall
2018-10-04 22:02:28 -04:00
parent 8ce1f88f53
commit c6a5ec1ab6
2 changed files with 16 additions and 5 deletions

View File

@@ -169,6 +169,7 @@ sortloot segfaulted when filtering a subset of items (seen with 'A' command)
orctown: prevent Bad fruit #0 and some minor tuning
make long extended commands list be more navigable
simplify #wizidentify; don't rely on having bold menu entries
ensure tmp_at() structures are initialized for all code paths when swallowed
tty: turn off an optimization that is the suspected cause of Windows reported
partial status lines following level changes
tty: ensure that current status fields are always copied to prior status

View File

@@ -1134,6 +1134,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
mon = u.ustuck;
bhitpos.x = mon->mx;
bhitpos.y = mon->my;
if (tethered_weapon)
tmp_at(DISP_TETHER, obj_to_glyph(obj));
} else if (u.dz) {
if (u.dz < 0
/* Mjollnir must we wielded to be thrown--caller verifies this;
@@ -1280,12 +1282,20 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
/* missile has already been handled */
if (tethered_weapon) tmp_at(DISP_END, 0);
} else if (u.uswallow) {
if (tethered_weapon)
if (tethered_weapon) {
tmp_at(DISP_END, 0);
/* ball is not picked up by monster */
if (obj != uball)
(void) mpickobj(u.ustuck, obj);
thrownobj = (struct obj *) 0;
pline("%s returns to your hand!", The(xname(thrownobj)));
thrownobj = addinv(thrownobj);
(void) encumber_msg();
if (thrownobj->owornmask & W_QUIVER) /* in case addinv() autoquivered */
setuqwep((struct obj *) 0);
setuwep(thrownobj);
} else {
/* ball is not picked up by monster */
if (obj != uball)
(void) mpickobj(u.ustuck, obj);
thrownobj = (struct obj *) 0;
}
} else {
/* Mjollnir must we wielded to be thrown--caller verifies this;
aklys must we wielded as primary to return when thrown */