]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Simplify sliderTeams update code
authorterencehill <piuntn@gmail.com>
Sat, 27 Dec 2014 21:30:39 +0000 (22:30 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 27 Dec 2014 21:30:39 +0000 (22:30 +0100)
qcsrc/menu/xonotic/dialog_multiplayer_create.c

index 1e06d98fc28111866fba3118230743b2c54d53e4..bbffb52765b310401f005ff59d5d6f2a4848a9db 100644 (file)
@@ -190,18 +190,17 @@ void XonoticServerCreateTab_gameTypeChangeNotify(entity me)
                default:                      GameType_ConfigureSliders(e, l, _("Frag limit:"),      5,  100,  5, "fraglimit_override");       break;
        }
 
-       float x = FALSE;
+       string x = string_null;
        e = me.sliderTeams;
        switch(gt)
        {
-               case MAPINFO_TYPE_CA:               x = TRUE; e.configureXonoticTextSlider(e, "g_ca_teams_override");          break;
-               case MAPINFO_TYPE_DOMINATION:       x = TRUE; e.configureXonoticTextSlider(e, "g_domination_teams_override");  break;
-               case MAPINFO_TYPE_FREEZETAG:        x = TRUE; e.configureXonoticTextSlider(e, "g_freezetag_teams_override");   break;
-               case MAPINFO_TYPE_KEYHUNT:          x = TRUE; e.configureXonoticTextSlider(e, "g_keyhunt_teams_override");     break;
-               case MAPINFO_TYPE_TEAM_DEATHMATCH:  x = TRUE; e.configureXonoticTextSlider(e, "g_tdm_teams_override");         break;
-
-               default: x = FALSE; e.configureXonoticTextSlider(e, string_null); break;
+               case MAPINFO_TYPE_CA:               x = "g_ca_teams_override";          break;
+               case MAPINFO_TYPE_DOMINATION:       x = "g_domination_teams_override";  break;
+               case MAPINFO_TYPE_FREEZETAG:        x = "g_freezetag_teams_override";   break;
+               case MAPINFO_TYPE_KEYHUNT:          x = "g_keyhunt_teams_override";     break;
+               case MAPINFO_TYPE_TEAM_DEATHMATCH:  x = "g_tdm_teams_override";         break;
        }
+       e.configureXonoticTextSlider(e, x);
        e.configureXonoticTextSliderValues(e);
        if(!x)
                e.value = 0;