mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 09:42:33 +00:00
Improve the defaulting thing to not play the sound if the cvar isn't to be touched.
This commit is contained in:
parent
5c5cbeeea2
commit
39e6169b42
1 changed files with 14 additions and 13 deletions
27
src/m_menu.c
27
src/m_menu.c
|
@ -2195,21 +2195,14 @@ static void M_ChangeCvar(INT32 choice)
|
|||
|
||||
if (choice == -1)
|
||||
{
|
||||
if (cv == &cv_dummystaff
|
||||
|| cv == &cv_nextmap
|
||||
|| cv == &cv_newgametype)
|
||||
return;
|
||||
if (currentMenu == &SP_TimeAttackDef)
|
||||
if (cv == &cv_playercolor)
|
||||
{
|
||||
if (cv == &cv_playercolor)
|
||||
{
|
||||
SINT8 skinno = R_SkinAvailable(cv_chooseskin.string);
|
||||
if (skinno == -1)
|
||||
return;
|
||||
CV_SetValue(cv,skins[skinno].prefcolor);
|
||||
}
|
||||
return;
|
||||
SINT8 skinno = R_SkinAvailable(cv_chooseskin.string);
|
||||
if (skinno == -1)
|
||||
return;
|
||||
CV_SetValue(cv,skins[skinno].prefcolor);
|
||||
}
|
||||
return;
|
||||
CV_Set(cv,cv->defaultvalue);
|
||||
return;
|
||||
}
|
||||
|
@ -2674,6 +2667,14 @@ boolean M_Responder(event_t *ev)
|
|||
if (routine && ((currentMenu->menuitems[itemOn].status & IT_TYPE) == IT_ARROWS
|
||||
|| (currentMenu->menuitems[itemOn].status & IT_TYPE) == IT_CVAR))
|
||||
{
|
||||
consvar_t *cv = (consvar_t *)currentMenu->menuitems[itemOn].itemaction;
|
||||
|
||||
if (cv == &cv_chooseskin
|
||||
|| cv == &cv_dummystaff
|
||||
|| cv == &cv_nextmap
|
||||
|| cv == &cv_newgametype)
|
||||
return true;
|
||||
|
||||
if (currentMenu != &OP_SoundOptionsDef)
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
routine(-1);
|
||||
|
|
Loading…
Reference in a new issue