mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-21 18:32:08 +00:00
Correcting a few cockups.
This commit is contained in:
parent
b2bfe3737a
commit
8087cde5db
3 changed files with 37 additions and 53 deletions
|
@ -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. :(
|
||||
|
|
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
|
||||
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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue