disclosure fix
Back in December, a change was made to suppress status when u.uhp == -1. But if the hero died with exactly that amount, the status display would be blanked out during end of game disclosure. Force u.uhp to be 0 when dying. That was already happening if death occurred while hero still had positive HP, but not when damage took him/her to negative.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.283 $ $NHDT-Date: 1553644725 2019/03/26 23:58:45 $
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.284 $ $NHDT-Date: 1553652951 2019/03/27 02:15:51 $
|
||||
|
||||
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
||||
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
||||
@@ -467,6 +467,8 @@ having an artifact wish be refused ("for a moment you feel <artifact> in
|
||||
using 'O' to set status hilites for any status condition (Blind, &c) and
|
||||
specifying more than one attribute (Bold, Inverse, &c) it would only
|
||||
retain one of the chosen attributes
|
||||
when u.uhp==-1 became a flag to suppress status updating, if game ended when
|
||||
hero died with exactly -1 HP, status would be blank during disclosure
|
||||
tty: turn off an optimization that is the suspected cause of Windows reported
|
||||
partial status lines following level changes
|
||||
tty: ensure that current status fields are always copied to prior status
|
||||
|
||||
11
src/end.c
11
src/end.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1549921169 2019/02/11 21:39:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.163 $ */
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1553652951 2019/03/27 02:15:51 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.166 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1086,10 +1086,11 @@ int how;
|
||||
if (how < PANICKED) {
|
||||
u.umortality++;
|
||||
/* in case caller hasn't already done this */
|
||||
if (u.uhp > 0 || (Upolyd && u.mh > 0)) {
|
||||
/* for deaths not triggered by loss of hit points, force
|
||||
current HP to zero (0 HP when turning into green slime
|
||||
is iffy but we don't have much choice--that is fatal) */
|
||||
if (u.uhp != 0 || (Upolyd && u.mh != 0)) {
|
||||
/* force HP to zero in case it is still positive (some
|
||||
deaths aren't triggered by loss of hit points), or
|
||||
negative (-1 is used as a flag in some circumstances
|
||||
which don't apply when actually dying due to HP loss) */
|
||||
u.uhp = u.mh = 0;
|
||||
context.botl = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user