From 99f5bbc59edb4ce9e2e6a3cf9bf88d0ab6b1606f Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 8 Dec 2017 23:06:25 -0800 Subject: [PATCH] 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. --- doc/fixes36.1 | 2 ++ src/end.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index dd192f3f8..d844df709 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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) diff --git a/src/end.c b/src/end.c index e1d8a6423..427f4501c 100644 --- a/src/end.c +++ b/src/end.c @@ -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();