From 15eecb4e888c7e85bfecf0882d2208c597bf0685 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Wed, 3 Jan 2024 00:00:46 -0600 Subject: [PATCH] Use staff demo wad/lump index for attraction mode --- src/f_finale.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index f1aa884f2..6dd6576da 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1890,6 +1890,8 @@ void F_TitleScreenTicker(boolean run) UINT16 mapnum; UINT8 numstaff; static boolean use_netreplay = false; + const char *lumpname; + staffbrief_t *brief; if ((use_netreplay = !use_netreplay)) { @@ -1915,10 +1917,12 @@ void F_TitleScreenTicker(boolean run) return; } - numstaff = M_RandomKey(mapheaderinfo[mapnum]->ghostCount)+1; + numstaff = M_RandomKey(mapheaderinfo[mapnum]->ghostCount); // Setup demo name - sprintf(dname, "%s/GHOST_%u", mapheaderinfo[mapnum]->lumpname, numstaff); + brief = mapheaderinfo[mapnum]->ghostBrief[numstaff]; + lumpname = W_CheckNameForNumPwad(brief->wad, brief->lump); + strcpy_s(dname, sizeof(dname), lumpname); loadreplay: demo.title = true;