Text tombstone overflow and helpless
Betatesters noticed the death message could overflow the text tombstone, because the helpless reason was also shown there. So don't show the helpless at all in the tombstone. The helpless is still put in the record, logfile, and as a separate while-field in xlogfile.
This commit is contained in:
@@ -478,12 +478,6 @@ int how;
|
||||
Sprintf(eos(buf), " called %s", MNAME(mtmp));
|
||||
}
|
||||
|
||||
if (multi) {
|
||||
if (multi_reason)
|
||||
Sprintf(eos(buf), ", while %s", multi_reason);
|
||||
else
|
||||
Strcat(buf, ", while helpless");
|
||||
}
|
||||
Strcpy(killer.name, buf);
|
||||
if (mptr->mlet == S_WRAITH)
|
||||
u.ugrave_arise = PM_WRAITH;
|
||||
|
||||
10
src/topten.c
10
src/topten.c
@@ -262,10 +262,10 @@ struct toptenentry *tt;
|
||||
static const char fmt33[] = "%s %s %s %s "; /* role,race,gndr,algn */
|
||||
#ifndef NO_SCAN_BRACK
|
||||
static const char fmt0[] = "%d.%d.%d %ld %d %d %d %d %d %d %ld %ld %d ";
|
||||
static const char fmtX[] = "%s,%s\n";
|
||||
static const char fmtX[] = "%s,%s%s%s\n";
|
||||
#else /* NO_SCAN_BRACK */
|
||||
static const char fmt0[] = "%d %d %d %ld %d %d %d %d %d %d %ld %ld %d ";
|
||||
static const char fmtX[] = "%s %s\n";
|
||||
static const char fmtX[] = "%s %s%s%s\n";
|
||||
|
||||
nsb_mung_line(tt->name);
|
||||
nsb_mung_line(tt->death);
|
||||
@@ -281,7 +281,9 @@ struct toptenentry *tt;
|
||||
(void) fprintf(rfile, fmt33, tt->plrole, tt->plrace, tt->plgend,
|
||||
tt->plalign);
|
||||
(void) fprintf(rfile, fmtX, onlyspace(tt->name) ? "_" : tt->name,
|
||||
tt->death);
|
||||
tt->death,
|
||||
(multi ? ", while " : ""),
|
||||
(multi ? (multi_reason ? multi_reason : "helpless") : ""));
|
||||
|
||||
#ifdef NO_SCAN_BRACK
|
||||
nsb_unmung_line(tt->name);
|
||||
@@ -315,6 +317,8 @@ struct toptenentry *tt;
|
||||
Fprintf(rfile, "%s%cname=%s%cdeath=%s",
|
||||
buf, /* (already includes separator) */
|
||||
XLOG_SEP, plname, XLOG_SEP, tt->death);
|
||||
if (multi)
|
||||
Fprintf(rfile, "%cwhile=%s", XLOG_SEP, multi_reason ? multi_reason : "helpless");
|
||||
Fprintf(rfile, "%cconduct=0x%lx%cturns=%ld%cachieve=0x%lx", XLOG_SEP,
|
||||
encodeconduct(), XLOG_SEP, moves, XLOG_SEP, encodeachieve());
|
||||
Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime=%ld", XLOG_SEP,
|
||||
|
||||
Reference in New Issue
Block a user