mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-14 23:21:49 +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
da7407b6ad
commit
94446a38eb
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…
Add table
Reference in a new issue