Correcting a few cockups.
This commit is contained in:
parent
b2bfe3737a
commit
8087cde5db
|
@ -433,7 +433,7 @@ static void readAnimTex(MYFILE *f, INT32 num)
|
||||||
static boolean findFreeSlot(INT32 *num, UINT16 wadnum)
|
static boolean findFreeSlot(INT32 *num, UINT16 wadnum)
|
||||||
{
|
{
|
||||||
// Send the character select entry to a free slot.
|
// 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;
|
*num = *num+1;
|
||||||
|
|
||||||
// No more free slots. :(
|
// No more free slots. :(
|
||||||
|
|
64
src/m_menu.c
64
src/m_menu.c
|
@ -110,38 +110,38 @@ const char *quitmsg[NUM_QUITMESSAGES];
|
||||||
// Stuff for customizing the player select screen Tails 09-22-2003
|
// Stuff for customizing the player select screen Tails 09-22-2003
|
||||||
description_t description[32] =
|
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 char *char_notes = NULL;
|
||||||
static fixed_t char_scroll = 0;
|
static fixed_t char_scroll = 0;
|
||||||
|
|
|
@ -2530,14 +2530,10 @@ void R_AddSkins(UINT16 wadnum)
|
||||||
{
|
{
|
||||||
INT32 skinnum = R_SkinAvailable(value);
|
INT32 skinnum = R_SkinAvailable(value);
|
||||||
strlwr(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)
|
if (skinnum == -1)
|
||||||
{
|
|
||||||
STRBUFCPY(skin->name, value);
|
STRBUFCPY(skin->name, value);
|
||||||
}
|
// the skin name must uniquely identify a single skin
|
||||||
// I'm not lazy, so if the name is already used I make the name 'namex'
|
// if the name is already used I make the name 'namex'
|
||||||
// using the default skin name's number set above
|
// using the default skin name's number set above
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2548,21 +2544,9 @@ void R_AddSkins(UINT16 wadnum)
|
||||||
"%s%d", value, numskins);
|
"%s%d", value, numskins);
|
||||||
value2[stringspace - 1] = '\0';
|
value2[stringspace - 1] = '\0';
|
||||||
if (R_SkinAvailable(value2) == -1)
|
if (R_SkinAvailable(value2) == -1)
|
||||||
{
|
// I'm lazy so if NEW name is already used I leave the 'skin x'
|
||||||
char* name;
|
- // default skin name set in Sk_SetDefaultValue
|
||||||
INT32 i;
|
|
||||||
STRBUFCPY(skin->name, value2);
|
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);
|
Z_Free(value2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue