mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Let's not use terms like this so plainly, right?
This commit is contained in:
parent
096921cbbf
commit
842c27e78b
6 changed files with 15 additions and 15 deletions
|
@ -1165,7 +1165,7 @@ found:
|
|||
if (var == &cv_forceskin)
|
||||
{
|
||||
var->value = R_SkinAvailable(var->string);
|
||||
if (!R_SkinUnlock(-1, var->value))
|
||||
if (!R_SkinUsable(-1, var->value))
|
||||
var->value = -1;
|
||||
}
|
||||
else
|
||||
|
@ -1364,7 +1364,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
|||
if (var == &cv_forceskin)
|
||||
{
|
||||
INT32 skin = R_SkinAvailable(value);
|
||||
if ((stricmp(value, "None")) && ((skin == -1) || !R_SkinUnlock(-1, skin)))
|
||||
if ((stricmp(value, "None")) && ((skin == -1) || !R_SkinUsable(-1, skin)))
|
||||
{
|
||||
CONS_Printf("Please provide a valid skin name (\"None\" disables).\n");
|
||||
return;
|
||||
|
@ -1488,7 +1488,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
else if (newvalue >= numskins)
|
||||
newvalue = -1;
|
||||
} while ((oldvalue != newvalue)
|
||||
&& !(R_SkinUnlock(-1, newvalue)));
|
||||
&& !(R_SkinUsable(-1, newvalue)));
|
||||
}
|
||||
else
|
||||
newvalue = var->value + increment;
|
||||
|
|
|
@ -1129,7 +1129,7 @@ static void SendNameAndColor(void)
|
|||
SetPlayerSkinByNum(consoleplayer, 0);
|
||||
CV_StealthSet(&cv_skin, skins[0].name);
|
||||
}
|
||||
else if ((foundskin = R_SkinAvailable(cv_skin.string)) != -1 && R_SkinUnlock(consoleplayer, foundskin))
|
||||
else if ((foundskin = R_SkinAvailable(cv_skin.string)) != -1 && R_SkinUsable(consoleplayer, foundskin))
|
||||
{
|
||||
boolean notsame;
|
||||
|
||||
|
@ -1176,7 +1176,7 @@ static void SendNameAndColor(void)
|
|||
// check if player has the skin loaded (cv_skin may have
|
||||
// the name of a skin that was available in the previous game)
|
||||
cv_skin.value = R_SkinAvailable(cv_skin.string);
|
||||
if ((cv_skin.value < 0) || !R_SkinUnlock(consoleplayer, cv_skin.value))
|
||||
if ((cv_skin.value < 0) || !R_SkinUsable(consoleplayer, cv_skin.value))
|
||||
{
|
||||
CV_StealthSet(&cv_skin, DEFAULTSKIN);
|
||||
cv_skin.value = 0;
|
||||
|
@ -1257,7 +1257,7 @@ static void SendNameAndColor2(void)
|
|||
SetPlayerSkinByNum(secondplaya, forcedskin);
|
||||
CV_StealthSet(&cv_skin2, skins[forcedskin].name);
|
||||
}
|
||||
else if ((foundskin = R_SkinAvailable(cv_skin2.string)) != -1 && R_SkinUnlock(secondplaya, foundskin))
|
||||
else if ((foundskin = R_SkinAvailable(cv_skin2.string)) != -1 && R_SkinUsable(secondplaya, foundskin))
|
||||
{
|
||||
boolean notsame;
|
||||
|
||||
|
|
|
@ -511,7 +511,7 @@ static int mobj_set(lua_State *L)
|
|||
for (i = 0; i < numskins; i++)
|
||||
if (fastcmp(skins[i].name, skin))
|
||||
{
|
||||
if (!mo->player || R_SkinUnlock(mo->player-players, i))
|
||||
if (!mo->player || R_SkinUsable(mo->player-players, i))
|
||||
mo->skin = &skins[i];
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3374,7 +3374,7 @@ static void M_PatchSkinNameTable(void)
|
|||
|
||||
for (j = 0; j < MAXSKINS; j++)
|
||||
{
|
||||
if (skins[j].name[0] != '\0' && R_SkinUnlock(-1, j))
|
||||
if (skins[j].name[0] != '\0' && R_SkinUsable(-1, j))
|
||||
{
|
||||
skins_cons_t[j].strvalue = skins[j].realname;
|
||||
skins_cons_t[j].value = j+1;
|
||||
|
@ -4737,7 +4737,7 @@ static void M_SetupChoosePlayer(INT32 choice)
|
|||
{
|
||||
name = strtok(Z_StrDup(description[i].skinname), "&");
|
||||
skinnum = R_SkinAvailable(name);
|
||||
if ((skinnum != -1) && (R_SkinUnlock(-1, skinnum)))
|
||||
if ((skinnum != -1) && (R_SkinUsable(-1, skinnum)))
|
||||
{
|
||||
// Handling order.
|
||||
if (firstvalid == 255)
|
||||
|
@ -6524,7 +6524,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
if (setupm_fakeskin < 0)
|
||||
setupm_fakeskin = numskins-1;
|
||||
}
|
||||
while ((prev_setupm_fakeskin != setupm_fakeskin) && !(R_SkinUnlock(-1, setupm_fakeskin)));
|
||||
while ((prev_setupm_fakeskin != setupm_fakeskin) && !(R_SkinUsable(-1, setupm_fakeskin)));
|
||||
}
|
||||
else if (itemOn == 1) // player color
|
||||
{
|
||||
|
@ -6544,7 +6544,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
if (setupm_fakeskin > numskins-1)
|
||||
setupm_fakeskin = 0;
|
||||
}
|
||||
while ((prev_setupm_fakeskin != setupm_fakeskin) && !(R_SkinUnlock(-1, setupm_fakeskin)));
|
||||
while ((prev_setupm_fakeskin != setupm_fakeskin) && !(R_SkinUsable(-1, setupm_fakeskin)));
|
||||
}
|
||||
else if (itemOn == 1) // player color
|
||||
{
|
||||
|
|
|
@ -2569,7 +2569,7 @@ UINT32 R_GetSkinAvailabilities(void)
|
|||
|
||||
// returns true if available in circumstances, otherwise nope
|
||||
// warning don't use with an invalid skinnum other than -1 which always returns true
|
||||
boolean R_SkinUnlock(INT32 playernum, INT32 skinnum)
|
||||
boolean R_SkinUsable(INT32 playernum, INT32 skinnum)
|
||||
{
|
||||
return ((skinnum == -1) // Simplifies things elsewhere, since there's already plenty of checks for less-than-0...
|
||||
|| (!skins[skinnum].availability)
|
||||
|
@ -2601,7 +2601,7 @@ void SetPlayerSkin(INT32 playernum, const char *skinname)
|
|||
INT32 i = R_SkinAvailable(skinname);
|
||||
player_t *player = &players[playernum];
|
||||
|
||||
if ((i != -1) && R_SkinUnlock(playernum, i))
|
||||
if ((i != -1) && R_SkinUsable(playernum, i))
|
||||
{
|
||||
SetPlayerSkinByNum(playernum, i);
|
||||
return;
|
||||
|
@ -2623,7 +2623,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
|||
skin_t *skin = &skins[skinnum];
|
||||
UINT8 newcolor = 0;
|
||||
|
||||
if (skinnum >= 0 && skinnum < numskins && R_SkinUnlock(playernum, skinnum)) // Make sure it exists!
|
||||
if (skinnum >= 0 && skinnum < numskins && R_SkinUsable(playernum, skinnum)) // Make sure it exists!
|
||||
{
|
||||
player->skin = skinnum;
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ extern skin_t skins[MAXSKINS + 1];
|
|||
|
||||
void SetPlayerSkin(INT32 playernum,const char *skinname);
|
||||
void SetPlayerSkinByNum(INT32 playernum,INT32 skinnum); // Tails 03-16-2002
|
||||
boolean R_SkinUnlock(INT32 playernum, INT32 skinnum);
|
||||
boolean R_SkinUsable(INT32 playernum, INT32 skinnum);
|
||||
UINT32 R_GetSkinAvailabilities(void);
|
||||
INT32 R_SkinAvailable(const char *name);
|
||||
void R_AddSkins(UINT16 wadnum);
|
||||
|
|
Loading…
Reference in a new issue