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:
14
src/end.c
14
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();
|
||||
|
||||
Reference in New Issue
Block a user