fix #H5590 - pets not shown on dumplog map

When ascending or escaping from the dungeon, adjacent pets are moved
onto the 'mydogs' list so that they can be included in the score and
mentioned as being with hero in the final messages.  But keepdogs()
was caled to do that before the known portion of the map was drawn
in the dumplog file, so adjacent pets were missing.  Defer that until
after the map has been dumped so that pets will still be present.
This commit is contained in:
PatR
2017-12-08 23:06:25 -08:00
parent 3f9522041c
commit 99f5bbc59e
2 changed files with 10 additions and 6 deletions

View File

@@ -514,6 +514,8 @@ DUMPLOG: genocided and extinct species was always a blank line;
vanquished creatures was just a blank line if nothing had been killed
DUMPLOG: RIP tombstone was printed for characters who survived (ascended,
escaped dungeon, quit, trickery or panic)
DUMPLOG: pets who accompany hero during ascension or dungeon escape were
already gone by the time known portion of the level map was dumped
artifact creation violated illiterate conduct when artifact name was assigned,
behavior intended only for creating Sting or Orcrist via naming
tty: revert to pline() for issuing prompts (override MSGTYPE=hide differently)

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 end.c $NHDT-Date: 1495232357 2017/05/19 22:19:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.131 $ */
/* NetHack 3.6 end.c $NHDT-Date: 1512803167 2017/12/09 07:06:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.137 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1142,11 +1142,6 @@ int how;
else if (how == TURNED_SLIME)
u.ugrave_arise = PM_GREEN_SLIME;
/* 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;
if (u.uhp < 1) {
@@ -1194,6 +1189,13 @@ int how;
dump_everything(how, endtime);
}
/* if pets will contribute to score, populate mydogs list now
(bones creation isn't a factor, but pline() messaging is; used to
be done ever sooner, but we need it to come after dump_everything()
so that any accompanying pets are still on the map during dump) */
if (how == ESCAPED || how == ASCENDED)
keepdogs(TRUE);
/* finish_paybill should be called after disclosure but before bones */
if (bones_ok && taken)
finish_paybill();