mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Remove defaultname, since players are probably sure on their name change
This commit is contained in:
parent
6595d20709
commit
82ad6685a6
4 changed files with 4 additions and 18 deletions
|
@ -223,8 +223,8 @@ consvar_t cv_allowseenames = {"allowseenames", "Yes", CV_NETVAR, CV_YesNo, NULL,
|
|||
#endif
|
||||
|
||||
// names
|
||||
consvar_t cv_playername = {"name", "Sonic", CV_CALL|CV_NOINIT, NULL, Name_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_playername2 = {"name2", "Tails", CV_CALL|CV_NOINIT, NULL, Name2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_playername = {"name", "Sonic", CV_SAVE|CV_CALL|CV_NOINIT, NULL, Name_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_playername2 = {"name2", "Tails", CV_SAVE|CV_CALL|CV_NOINIT, NULL, Name2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
// player colors
|
||||
consvar_t cv_playercolor = {"color", "Blue", CV_CALL|CV_NOINIT, Color_cons_t, Color_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_playercolor2 = {"color2", "Orange", CV_CALL|CV_NOINIT, Color_cons_t, Color2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -233,8 +233,6 @@ consvar_t cv_skin = {"skin", DEFAULTSKIN, CV_CALL|CV_NOINIT, NULL, Skin_OnChange
|
|||
consvar_t cv_skin2 = {"skin2", DEFAULTSKIN2, CV_CALL|CV_NOINIT, NULL, Skin2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
// saved versions of the above six
|
||||
consvar_t cv_defaultplayername = {"defaultname", "Sonic", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_defaultplayername2 = {"defaultname2", "Tails", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_defaultplayercolor = {"defaultcolor", "Blue", CV_SAVE, Color_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_defaultplayercolor2 = {"defaultcolor2", "Orange", CV_SAVE, Color_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_defaultskin = {"defaultskin", DEFAULTSKIN, CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -670,10 +668,8 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_playercolor2);
|
||||
CV_RegisterVar(&cv_skin2);
|
||||
// saved versions of the above six
|
||||
CV_RegisterVar(&cv_defaultplayername);
|
||||
CV_RegisterVar(&cv_defaultplayercolor);
|
||||
CV_RegisterVar(&cv_defaultskin);
|
||||
CV_RegisterVar(&cv_defaultplayername2);
|
||||
CV_RegisterVar(&cv_defaultplayercolor2);
|
||||
CV_RegisterVar(&cv_defaultskin2);
|
||||
|
||||
|
|
|
@ -26,10 +26,8 @@ extern consvar_t cv_playername2;
|
|||
extern consvar_t cv_playercolor2;
|
||||
extern consvar_t cv_skin2;
|
||||
// saved versions of the above six
|
||||
extern consvar_t cv_defaultplayername;
|
||||
extern consvar_t cv_defaultplayercolor;
|
||||
extern consvar_t cv_defaultskin;
|
||||
extern consvar_t cv_defaultplayername2;
|
||||
extern consvar_t cv_defaultplayercolor2;
|
||||
extern consvar_t cv_defaultskin2;
|
||||
|
||||
|
|
10
src/m_menu.c
10
src/m_menu.c
|
@ -10468,7 +10468,6 @@ static consvar_t *setupm_cvcolor;
|
|||
static consvar_t *setupm_cvname;
|
||||
static consvar_t *setupm_cvdefaultskin;
|
||||
static consvar_t *setupm_cvdefaultcolor;
|
||||
static consvar_t *setupm_cvdefaultname;
|
||||
static INT32 setupm_fakeskin;
|
||||
static INT32 setupm_fakecolor;
|
||||
|
||||
|
@ -10630,8 +10629,7 @@ colordraw:
|
|||
|
||||
V_DrawString(x, y,
|
||||
((R_SkinAvailable(setupm_cvdefaultskin->string) != setupm_fakeskin
|
||||
|| setupm_cvdefaultcolor->value != setupm_fakecolor
|
||||
|| strcmp(setupm_name, setupm_cvdefaultname->string))
|
||||
|| setupm_cvdefaultcolor->value != setupm_fakecolor)
|
||||
? 0
|
||||
: V_TRANSLUCENT)
|
||||
| ((itemOn == 3) ? V_YELLOWMAP : 0),
|
||||
|
@ -10686,14 +10684,12 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
case KEY_ENTER:
|
||||
if (itemOn == 3
|
||||
&& (R_SkinAvailable(setupm_cvdefaultskin->string) != setupm_fakeskin
|
||||
|| setupm_cvdefaultcolor->value != setupm_fakecolor
|
||||
|| strcmp(setupm_name, setupm_cvdefaultname->string)))
|
||||
|| setupm_cvdefaultcolor->value != setupm_fakecolor))
|
||||
{
|
||||
S_StartSound(NULL,sfx_strpst);
|
||||
// you know what? always putting these in the buffer won't hurt anything.
|
||||
COM_BufAddText (va("%s \"%s\"\n",setupm_cvdefaultskin->name,skins[setupm_fakeskin].name));
|
||||
COM_BufAddText (va("%s %d\n",setupm_cvdefaultcolor->name,setupm_fakecolor));
|
||||
COM_BufAddText (va("%s %s\n",setupm_cvdefaultname->name,setupm_name));
|
||||
break;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
|
@ -10792,7 +10788,6 @@ static void M_SetupMultiPlayer(INT32 choice)
|
|||
setupm_cvname = &cv_playername;
|
||||
setupm_cvdefaultskin = &cv_defaultskin;
|
||||
setupm_cvdefaultcolor = &cv_defaultplayercolor;
|
||||
setupm_cvdefaultname = &cv_defaultplayername;
|
||||
|
||||
// For whatever reason this doesn't work right if you just use ->value
|
||||
setupm_fakeskin = R_SkinAvailable(setupm_cvskin->string);
|
||||
|
@ -10834,7 +10829,6 @@ static void M_SetupMultiPlayer2(INT32 choice)
|
|||
setupm_cvname = &cv_playername2;
|
||||
setupm_cvdefaultskin = &cv_defaultskin2;
|
||||
setupm_cvdefaultcolor = &cv_defaultplayercolor2;
|
||||
setupm_cvdefaultname = &cv_defaultplayername2;
|
||||
|
||||
// For whatever reason this doesn't work right if you just use ->value
|
||||
setupm_fakeskin = R_SkinAvailable(setupm_cvskin->string);
|
||||
|
|
|
@ -523,10 +523,8 @@ void M_FirstLoadConfig(void)
|
|||
gameconfig_loaded = true;
|
||||
|
||||
// reset to default player stuff
|
||||
COM_BufAddText (va("%s \"%s\"\n",cv_playername.name,cv_defaultplayername.string));
|
||||
COM_BufAddText (va("%s \"%s\"\n",cv_skin.name,cv_defaultskin.string));
|
||||
COM_BufAddText (va("%s \"%s\"\n",cv_playercolor.name,cv_defaultplayercolor.string));
|
||||
COM_BufAddText (va("%s \"%s\"\n",cv_playername2.name,cv_defaultplayername2.string));
|
||||
COM_BufAddText (va("%s \"%s\"\n",cv_skin2.name,cv_defaultskin2.string));
|
||||
COM_BufAddText (va("%s \"%s\"\n",cv_playercolor2.name,cv_defaultplayercolor2.string));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue