From 56036ed5c710a49ec33717fb6ac955204351f3f5 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 16 Sep 2023 17:48:51 -0700 Subject: [PATCH] status bit: trucated gold count Gold on status line can be truncated, so testing the display value might miss up/down/changed highlights. I don't think that it actually matters since a hero cannot pick up enough gold to reach the 999999 truncation threshold. Normal amounts still seem to highlight correctly after this. --- src/botl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/botl.c b/src/botl.c index a1f405e3c..f2d29a674 100644 --- a/src/botl.c +++ b/src/botl.c @@ -810,6 +810,7 @@ bot_via_windowport(void) /* Gold */ if ((money = money_cnt(gi.invent)) < 0L) money = 0L; /* ought to issue impossible() and then discard gold */ + gb.blstats[idx][BL_GOLD].rawval.a_long = money; gb.blstats[idx][BL_GOLD].a.a_long = min(money, 999999L); /* * The tty port needs to display the current symbol for gold @@ -1528,7 +1529,8 @@ compare_blstats(struct istat_s *bl1, struct istat_s *bl2) fld = bl1->fld; use_rawval = (fld == BL_HP || fld == BL_HPMAX - || fld == BL_ENE || fld == BL_ENEMAX); + || fld == BL_ENE || fld == BL_ENEMAX + || fld == BL_GOLD); a1 = use_rawval ? &bl1->rawval : &bl1->a; a2 = use_rawval ? &bl2->rawval : &bl2->a;