pets accompanying ascension or dungeon escape

There was a report recently about "<pet> is still eating" coming out
on the console at end of game for player using X11 or Qt.  That happened
because the end-of-game pet handling takes place after the message window
has been closed.  It won't happen with the dev code any more because eating
no longer prevents pets from accompanying on final ascent or escape.  But
a pet carrying the Amulet should still fail to tag along and yield similar
result.  However, levl_follower() was changed (probably by me...) to have
pets not attempt to follow when they carried the Amulet, rendering code
in keepdogs()--which reported them as being confused--unreachable.  This
reverts levl_follower() to have Amulet-carrying monsters other than the
Wizard try to accompany the hero during level changes (and keepdogs still
prevents them from succeeding).  It also reorganizes keepdogs() a bit,
giving trapped followers an extra chance to escape from their trap and
preventing those who fail that chance from tagging along (previously,
non-pets ignored being trapped).

     After doing that, I got tty to behave similarly to the X11/Qt report:
a message behaved strangely.  In my case, it was delivered between a pair
of clearings of the screen and only visible by using terminal emulator's
scrolling buffer.  I think there's a wait_synch() missing somewhere, but
haven't tried to figure out where.  Instead, this makes the end-of-game
call to keepdogs() take place sooner, while pline() still works normally.
This commit is contained in:
nethack.rankin
2007-03-03 06:20:14 +00:00
parent 06853548e0
commit d70d44b67f
4 changed files with 18 additions and 21 deletions

View File

@@ -700,6 +700,9 @@ die:
make_grave(u.ux, u.uy, pbuf);
}
}
/* if pets will contribute to score, populate mydogs list now
(bones creation isn't a factor, but pline() messaging is) */
if (how == ESCAPED || how == ASCENDED) keepdogs(TRUE);
if (how == QUIT) {
killer.format = NO_KILLER_PREFIX;
@@ -836,7 +839,6 @@ die:
/* count the points for artifacts */
artifact_score(invent, TRUE, endwin);
keepdogs(TRUE);
viz_array[0][0] |= IN_SIGHT; /* need visibility for naming */
mtmp = mydogs;
if (!done_stopprint) Strcpy(pbuf, "You");