simplify the slider stuff slightly
This commit is contained in:
1 parent
63517e3de3
commit
9c46306b07
1 file changed
+15
-13
+15
-13
@@ -3589,14 +3589,7 @@ static void M_ChangeCvar(INT32 choice)
|
||||
|
||||
choice = (choice<<1) - 1;
|
||||
|
||||
if (!(cv->flags & CV_FLOAT) &&
|
||||
(((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_SLIDER)
|
||||
||((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_INVISSLIDER)
|
||||
||((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_NOMOD)))
|
||||
{
|
||||
CV_SetValue(cv,cv->value+choice);
|
||||
}
|
||||
else if (cv->flags & CV_FLOAT)
|
||||
if (cv->flags & CV_FLOAT)
|
||||
{
|
||||
char s[20];
|
||||
float increment;
|
||||
@@ -3607,13 +3600,22 @@ static void M_ChangeCvar(INT32 choice)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_SLIDER)
|
||||
||((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_INVISSLIDER)
|
||||
||((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_NOMOD))
|
||||
{
|
||||
CV_SetValue(cv,cv->value+choice);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef NONET
|
||||
if (cv == &cv_nettimeout || cv == &cv_jointimeout)
|
||||
choice *= (TICRATE/7);
|
||||
else if (cv == &cv_maxsend)
|
||||
choice *= 512;
|
||||
if (cv == &cv_nettimeout || cv == &cv_jointimeout)
|
||||
choice *= (TICRATE/7);
|
||||
else if (cv == &cv_maxsend)
|
||||
choice *= 512;
|
||||
#endif
|
||||
CV_AddValue(cv,choice);
|
||||
CV_AddValue(cv,choice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user