From 8087cde5dbf92505f0c2c02e02568f095711569b Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Wed, 13 Jul 2016 13:26:21 +0100 Subject: [PATCH] Correcting a few cockups. --- src/dehacked.c | 2 +- src/m_menu.c | 64 +++++++++++++++++++++++++------------------------- src/r_things.c | 24 ++++--------------- 3 files changed, 37 insertions(+), 53 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index f8e631160..f8046c48c 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -433,7 +433,7 @@ static void readAnimTex(MYFILE *f, INT32 num) static boolean findFreeSlot(INT32 *num, UINT16 wadnum) { // Send the character select entry to a free slot. - while (*num < 32 && !(PlayerMenu[*num].status & IT_DISABLED && description[*num].wadnum != wadnum)) // Will kill hidden characters from other files, but that's okay. + while (*num < 32 && (!(PlayerMenu[*num].status & IT_DISABLED) || description[*num].wadnum == wadnum)) // Will kill hidden characters from other files, but that's okay. *num = *num+1; // No more free slots. :( diff --git a/src/m_menu.c b/src/m_menu.c index 53b5be270..5f0390749 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -110,38 +110,38 @@ const char *quitmsg[NUM_QUITMESSAGES]; // Stuff for customizing the player select screen Tails 09-22-2003 description_t description[32] = { - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""}, - {"???", "", ""} + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0}, + {"???", "", "", 0} }; static char *char_notes = NULL; static fixed_t char_scroll = 0; diff --git a/src/r_things.c b/src/r_things.c index ba5d33b7a..9f138fdd3 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2530,14 +2530,10 @@ void R_AddSkins(UINT16 wadnum) { INT32 skinnum = R_SkinAvailable(value); strlwr(value); - // the skin name must uniquely identify a single skin - // I'm lazy so if name is already used I leave the 'skin x' - // default skin name set in Sk_SetDefaultValue if (skinnum == -1) - { STRBUFCPY(skin->name, value); - } - // I'm not lazy, so if the name is already used I make the name 'namex' + // the skin name must uniquely identify a single skin + // if the name is already used I make the name 'namex' // using the default skin name's number set above else { @@ -2548,21 +2544,9 @@ void R_AddSkins(UINT16 wadnum) "%s%d", value, numskins); value2[stringspace - 1] = '\0'; if (R_SkinAvailable(value2) == -1) - { - char* name; - INT32 i; + // I'm lazy so if NEW name is already used I leave the 'skin x' +- // default skin name set in Sk_SetDefaultValue STRBUFCPY(skin->name, value2); - for (i = 0; i < 32; i++) - { - name = strtok(Z_StrDup(description[i].skinname), "&"); - strlwr(name); - if (name == value && description[i].wadnum == wadnum) // Update all character selects added with this WAD to refer to the new name. - STRBUFCPY(description[i].skinname, value2); // Breaks char&char2. - Z_Free(name); - } - } - else - CONS_Debug(DBG_SETUP, "R_AddSkins: Duplicate skin name replacement failure, S_SKIN lump #%d (WAD %s)\n", lump, wadfiles[wadnum]->filename); Z_Free(value2); }