u.uswallow

Make sure u.uswallow is cleared when u.ustuck gets set to Null so
that they won't be out of sync with each other.  Having u.uswallow
be non-zero does imply that u.ustuck is non-Null.

Running #panic while swallowed didn't produce any anomalies for me,
either before or after this change.
This commit is contained in:
PatR
2022-08-15 10:53:50 -07:00
parent b07fe59b3c
commit be0def37c1
4 changed files with 14 additions and 12 deletions

View File

@@ -1442,8 +1442,7 @@ goto_level(
unplacebc();
reset_utrap(FALSE); /* needed in level_tele */
fill_pit(u.ux, u.uy);
set_ustuck((struct monst *) 0); /* idem */
u.uswallow = u.uswldtim = 0;
set_ustuck((struct monst *) 0); /* clear u.ustuck and u.uswallow */
set_uinwater(0); /* u.uinwater = 0 */
u.uundetected = 0; /* not hidden, even if means are available */
keepdogs(FALSE);