From: PatR Date: Tue, 16 Oct 2018 01:26:49 +0000 (-0700) Subject: fix #H7453 - 'bonesknown' for dead hero X-Git-Tag: NetHack-3.6.2_Released~185^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0f5cfe0b3cfbba71a7ab90bd40dc7562481e5c5;p=nethack fix #H7453 - 'bonesknown' for dead hero Dead hero's map coordinates are set to <0,0> part way through bones creation, then were being used to record grave location for overview feedback with "final resting place for " if/when another character got those bones and found the grave (actually, spotted the location where first hero died regardless of whether a grave gets placed there). Record dead hero's pre-<0,0> coordinates as intended. Not previously noticed because in wizard mode the final resting place becomes part of overview info as soon as bones are loaded rather than waiting for the death location to be reached. --- diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 86ace2873..92096d3f1 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -165,6 +165,9 @@ during character creation, don't unset alternate weapon when a shield gets worn (was preventing knight from having lance set up as uswapwep) preformatted Guidebook.txt split line in middle of "' '" for #wait command prevent simiulated screenshot in Guidebook.txt from spanning page boundary +overview information for former hero was not being set properly when bones + file was saved, so current hero coming across a dead hero's grave + didn't have #overview feedback augmented with "final resting place" Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/bones.c b/src/bones.c index 33f5f2c36..77fc27124 100644 --- a/src/bones.c +++ b/src/bones.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 bones.c $NHDT-Date: 1508827591 2017/10/24 06:46:31 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.71 $ */ +/* NetHack 3.6 bones.c $NHDT-Date: 1539653203 2018/10/16 01:26:43 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.73 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -460,6 +460,7 @@ make_bones: resetobjs(level.buriedobjlist, FALSE); /* Hero is no longer on the map. */ + u.ux0 = u.ux, u.uy0 = u.uy; u.ux = u.uy = 0; /* Clear all memory from the level. */ @@ -485,7 +486,7 @@ make_bones: formatkiller(newbones->how, sizeof newbones->how, how, TRUE); Strcpy(newbones->when, yyyymmddhhmmss(when)); /* final resting place, used to decide when bones are discovered */ - newbones->frpx = u.ux, newbones->frpy = u.uy; + newbones->frpx = u.ux0, newbones->frpy = u.uy0; newbones->bonesknown = FALSE; /* if current character died on a bones level, the cemetery list will have multiple entries, most recent (this dead hero) first */