Merge remote-tracking branch 'origin/Mario/arena_nuke'
authorSamual Lenks <samual@xonotic.org>
Sun, 24 Nov 2013 04:33:51 +0000 (23:33 -0500)
committerSamual Lenks <samual@xonotic.org>
Sun, 24 Nov 2013 04:33:51 +0000 (23:33 -0500)
* origin/Mario/arena_nuke:
  Remove arena gamemode

Conflicts:
qcsrc/server/command/cmd.qc
qcsrc/server/mutators/gamemode_arena.qc

14 files changed:
1  2 
qcsrc/client/hud.qc
qcsrc/common/mapinfo.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/bot.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/progs.src
qcsrc/server/scores.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/t_quake3.qc
qcsrc/server/teamplay.qc

diff --combined qcsrc/client/hud.qc
@@@ -242,7 -242,7 +242,7 @@@ float GetPlayerColorForce(float i
  
  float GetPlayerColor(float i)
  {
 -      if not(playerslots[i].gotscores) // unconnected
 +      if(!playerslots[i].gotscores) // unconnected
                return NUM_SPECTATOR;
        else if(stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR)
                return NUM_SPECTATOR;
@@@ -734,12 -734,12 +734,12 @@@ void HUD_Weapons(void
  
                // skip this weapon if we don't own it (and onlyowned is enabled)-- or if weapons_complainbubble is showing for this weapon
                if(autocvar_hud_panel_weapons_onlyowned)
 -              if not((weapons_stat & WepSet_FromWeapon(self.weapon)) || (self.weapon == complain_weapon))
 +              if (!((weapons_stat & WepSet_FromWeapon(self.weapon)) || (self.weapon == complain_weapon)))
                        continue;
  
                // figure out the drawing position of weapon
 -              weapon_pos = (panel_pos 
 -                      + eX * column * weapon_size_x 
 +              weapon_pos = (panel_pos
 +                      + eX * column * weapon_size_x
                        + eY * row * weapon_size_y);
  
                // draw background behind currently selected weapon
@@@ -1133,7 -1133,7 +1133,7 @@@ void HUD_Powerups(void
        {
                if(!autocvar_hud_panel_powerups) return;
                if(spectatee_status == -1) return;
 -              if not(getstati(STAT_ITEMS, 0, 24) & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON)) return;
 +              if(!(getstati(STAT_ITEMS, 0, 24) & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON))) return;
                if (getstati(STAT_HEALTH) <= 0) return;
  
                strength_time = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 99);
@@@ -1543,7 -1543,7 +1543,7 @@@ void HUD_HealthArmor(void
                                        {
                                                float BLINK_FACTOR = 0.15;
                                                float BLINK_BASE = 0.85;
 -                                              float BLINK_FREQ = 9; 
 +                                              float BLINK_FREQ = 9;
                                                pain_health_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
                                        }
                                }
@@@ -1664,7 -1664,7 +1664,7 @@@ void HUD_Notify(void
        float entries, height;
        entries = bound(1, floor(KN_MAX_ENTRIES * mySize_y/mySize_x), KN_MAX_ENTRIES);
        height = mySize_y/entries;
 -      
 +
        vector fontsize;
        float fontheight = height * autocvar_hud_panel_notify_fontsize;
        fontsize = '0.5 0.5 0' * fontheight;
                        {
                                break;
                        }
 -                      
 +
                        attacker = notify_attackers[j];
                        victim = notify_victims[j];
                        icon = notify_icon[j];
@@@ -1865,10 -1865,10 +1865,10 @@@ void HUD_Radar(void
                panel_size_y = bound(0.2, panel_size_y, 1) * vid_conheight;
                panel_pos_x = (vid_conwidth - panel_size_x) / 2;
                panel_pos_y = (vid_conheight - panel_size_y) / 2;
 -              
 +
                panel_bg = strcat(hud_skin_path, "/border_default"); // always use the default border when maximized
                if(precache_pic(panel_bg) == "") { panel_bg = "gfx/hud/default/border_default"; } // fallback
 -              
 +
                switch(hud_panel_radar_maximized_zoommode)
                {
                        default:
                                f = 1;
                                break;
                }
 -              
 +
                switch(hud_panel_radar_maximized_rotation)
                {
                        case 0:
                                f = 1;
                                break;
                }
 -              
 +
                switch(hud_panel_radar_rotation)
                {
                        case 0:
@@@ -2297,7 -2297,7 +2297,7 @@@ void HUD_Score(void
                        score = tm.(teamscores[ts_primary]);
                        if(autocvar__hud_configure)
                                score = 123;
 -                      
 +
                        if (score > max_fragcount)
                                max_fragcount = score;
  
@@@ -2752,7 -2752,7 +2752,7 @@@ void HUD_Mod_CTF(vector pos, vector myS
        stat_items = getstati(STAT_ITEMS, 0, 24);
        redflag = (stat_items/IT_RED_FLAG_TAKEN) & 3;
        blueflag = (stat_items/IT_BLUE_FLAG_TAKEN) & 3;
 -      
 +
        if(redflag || blueflag)
                mod_active = 1;
        else
@@@ -3029,29 -3029,29 +3029,29 @@@ void HUD_Mod_KH(vector pos, vector mySi
  float kaball_prevstatus; // last remembered status
  float kaball_statuschange_time; // time when the status changed
  
 -// we don't need to reset for keepaway since it immediately 
 +// we don't need to reset for keepaway since it immediately
  // autocorrects prevstatus as to if the player has the ball or not
  
  void HUD_Mod_Keepaway(vector pos, vector mySize)
  {
        mod_active = 1; // keepaway should always show the mod HUD
 -      
 +
        float BLINK_FACTOR = 0.15;
        float BLINK_BASE = 0.85;
 -      float BLINK_FREQ = 5; 
 +      float BLINK_FREQ = 5;
        float kaball_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
 -      
 +
        float stat_items = getstati(STAT_ITEMS, 0, 24);
        float kaball = (stat_items/IT_KEY1) & 1;
 -      
 +
        if(kaball != kaball_prevstatus)
        {
                kaball_statuschange_time = time;
                kaball_prevstatus = kaball;
        }
 -      
 +
        vector kaball_pos, kaball_size;
 -      
 +
        if(mySize_x > mySize_y) {
                kaball_pos = pos + eX * 0.25 * mySize_x;
                kaball_size = eX * 0.5 * mySize_x + eY * mySize_y;
                kaball_pos = pos + eY * 0.25 * mySize_y;
                kaball_size = eY * 0.5 * mySize_y + eX * mySize_x;
        }
 -      
 +
        float kaball_statuschange_elapsedtime = time - kaball_statuschange_time;
        float f = bound(0, kaball_statuschange_elapsedtime*2, 1);
 -      
 +
        if(kaball_prevstatus && f < 1)
                drawpic_aspect_skin_expanding(kaball_pos, "keepawayball_carrying", kaball_size, '1 1 1', panel_fg_alpha * kaball_alpha, DRAWFLAG_NORMAL, f);
 -      
 +
        if(kaball)
                drawpic_aspect_skin(pos, "keepawayball_carrying", eX * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha * kaball_alpha * f, DRAWFLAG_NORMAL);
  }
@@@ -3123,7 -3123,7 +3123,7 @@@ void HUD_Mod_Race(vector pos, vector my
        float f; // yet another function has this
        score = me.(scores[ps_primary]);
  
 -      if not((scores_flags[ps_primary] & SFL_TIME) && !teamplay) // race/cts record display on HUD
 +      if(!(scores_flags[ps_primary] & SFL_TIME) || teamplay) // race/cts record display on HUD
                return; // no records in the actual race
  
        // clientside personal record
@@@ -3591,7 -3591,7 +3591,7 @@@ void HUD_EngineInfo(void
                frametimeavg = (frametimeavg + frametimeavg1 + frametimeavg2 + currentframetime)/4; // average three frametimes into framecounter for slightly more stable fps readings :P
                frametimeavg2 = frametimeavg1;
                frametimeavg1 = frametimeavg;
 -              
 +
                float weight;
                weight = cvar("hud_panel_engineinfo_framecounter_exponentialmovingaverage_new_weight");
                if(currentframetime > 0.0001) // filter out insane values which sometimes seem to occur and throw off the average? If you are getting 10,000 fps or more, then you don't need a framerate counter.
@@@ -3669,7 -3669,7 +3669,7 @@@ void HUD_InfoMessages(void
  
        vector fontsize;
        fontsize = '0.20 0.20 0' * mySize_y;
 -      
 +
        float a;
        a = panel_fg_alpha;
  
                        s = sprintf(_("^1Press ^3%s^1 for gamemode info"), getcommandkey("server info", "+show_info"));
                        drawInfoMessage(s)
  
-                       if(gametype == MAPINFO_TYPE_ARENA)
-                               s = _("^1Wait for your turn to join");
-                       else if(gametype == MAPINFO_TYPE_LMS)
+                       if(gametype == MAPINFO_TYPE_LMS)
                        {
                                entity sk;
                                sk = playerslots[player_localnum];
                        }
                }
        }
 -      else 
 +      else
        {
                s = _("^7Press ^3ESC ^7to show HUD options.");
                drawInfoMessage(s)
@@@ -3871,7 -3869,7 +3869,7 @@@ void HUD_Physics(void
                        conversion_factor = 0.0254 * 1.943844492; // 1 m/s = 1.943844492 knots, because 1 knot = 1.852 km/h
                        break;
        }
 -      
 +
        vector vel = (csqcplayer ? csqcplayer.velocity : pmove_vel);
  
        float max_speed = floor( autocvar_hud_panel_physics_speed_max * conversion_factor + 0.5 );
                        acceleration = (vlen(vel) - vlen(acc_prevspeed));
                else
                        acceleration = (vlen(vel - '0 0 1' * vel_z) - vlen(acc_prevspeed - '0 0 1' * acc_prevspeed_z));
 -              
 +
                acceleration = acceleration * (1 / max(0.0001, f)) * (0.0254 / 9.80665);
 -              
 +
                acc_prevspeed = vel;
                acc_prevtime = time;
  
@@@ -4229,9 -4227,9 +4227,9 @@@ void HUD_CenterPrint (void
                if (scoreboard_bottom >= 0.96 * vid_conheight)
                        return;
                vector target_pos;
 -              
 +
                target_pos = eY * scoreboard_bottom + eX * 0.5 * (vid_conwidth - panel_size_x);
 -              
 +
                if(target_pos_y > panel_pos_y)
                {
                        panel_pos = panel_pos + (target_pos - panel_pos) * sqrt(scoreboard_fade_alpha);
                }
  
  
 -              // fade the centerprint_hud in/out 
 +              // fade the centerprint_hud in/out
                if(centerprint_time[j] < 0)
                        a = bound(0, (time - centerprint_expire_time[j]) / max(0.0001, autocvar_hud_panel_centerprint_fade_in), 1);
                else if(centerprint_expire_time[j] - autocvar_hud_panel_centerprint_fade_out > time)
                        a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
                else
                        a = 0;
 -              
 +
                // set the size from fading in/out before subsequent fading
 -              sz = autocvar_hud_panel_centerprint_fade_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_minfontsize); 
 -              
 +              sz = autocvar_hud_panel_centerprint_fade_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_minfontsize);
 +
                // also fade it based on positioning
                if(autocvar_hud_panel_centerprint_fade_subsequent)
                {
                        a = a * bound(autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha, (1 - (g / max(1, autocvar_hud_panel_centerprint_fade_subsequent_passone))), 1); // pass one: all messages after the first have half theAlpha
                        a = a * bound(autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha, (1 - (g / max(1, autocvar_hud_panel_centerprint_fade_subsequent_passtwo))), 1); // pass two: after that, gradually lower theAlpha even more for each message
                }
 -              
 +
                // finally set the size based on the new theAlpha from subsequent fading
 -              sz = sz * (autocvar_hud_panel_centerprint_fade_subsequent_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_subsequent_minfontsize)); 
 +              sz = sz * (autocvar_hud_panel_centerprint_fade_subsequent_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_subsequent_minfontsize));
                drawfontscale = sz * '1 1 0';
 -              
 +
                if (centerprint_countdown_num[j])
                        n = tokenizebyseparator(strreplace("^COUNT", count_seconds(centerprint_countdown_num[j]), centerprint_messages[j]), "\n");
                else
                        }
                }
  
 -              ++g; // move next position number up 
 -              
 +              ++g; // move next position number up
 +
                msg_size = pos_y - msg_size;
                if (autocvar_hud_panel_centerprint_flip)
                {
                        pos_y = current_msg_pos_y - CENTERPRINT_SPACING * fontsize_y;
                        if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages
                                pos_y += (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(sz));
 -                              
 +
                        if (pos_y < panel_pos_y) // check if the next message can be shown
                        {
                                drawfontscale = '1 1 0';
                        pos_y += CENTERPRINT_SPACING * fontsize_y;
                        if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages
                                pos_y -= (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(sz));
 -                              
 +
                        if(pos_y > panel_pos_y + panel_size_y - fontsize_y) // check if the next message can be shown
                        {
                                drawfontscale = '1 1 0';
diff --combined qcsrc/common/mapinfo.qc
@@@ -84,7 -84,7 +84,7 @@@ float MapInfo_Cache_Retrieve(string map
  
  // GLOB HANDLING (for all BSP files)
  float _MapInfo_globopen;
 -float _MapInfo_globcount; 
 +float _MapInfo_globcount;
  float _MapInfo_globhandle;
  string _MapInfo_GlobItem(float i)
  {
@@@ -141,7 -141,7 +141,7 @@@ float _MapInfo_FilterList_cmp(float i, 
  float MapInfo_FilterGametype(float pGametype, float pFeatures, float pFlagsRequired, float pFlagsForbidden, float pAbortOnGenerate)
  {
        float i, j;
 -      if not(_MapInfo_filtered_allocated)
 +      if (!_MapInfo_filtered_allocated)
        {
                _MapInfo_filtered_allocated = 1;
                _MapInfo_filtered = buf_create();
        }
        MapInfo_count = j + 1;
        MapInfo_ClearTemps();
 -      
 +
        // sometimes the glob isn't sorted nicely, so fix it here...
        heapsort(MapInfo_count, _MapInfo_FilterList_swap, _MapInfo_FilterList_cmp, world);
  
@@@ -257,7 -257,7 +257,7 @@@ float _MapInfo_Generate(string pFilenam
  
        for(;;)
        {
 -              if not((s = fgets(fh)))
 +              if (!((s = fgets(fh))))
                        break;
                if(inWorldspawn == 1)
                        if(startsWith(s, "}"))
                        MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_FREEZETAG;
                        MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CA;
                }
-               if(                     diameter < 4096)
-                       MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_ARENA;
                if(spawnpoints >= 12 && diameter > 5120)
                        MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_KEYHUNT;
        }
@@@ -416,7 -414,6 +414,6 @@@ string _MapInfo_GetDefault(float t
                case MAPINFO_TYPE_DOMINATION:      return "200 20 0";
                case MAPINFO_TYPE_CTF:             return "300 20 10 0";
                case MAPINFO_TYPE_LMS:             return "9 20 0";
-               case MAPINFO_TYPE_ARENA:           return "10 20 0";
                case MAPINFO_TYPE_CA:              return "10 20 0";
                case MAPINFO_TYPE_KEYHUNT:         return "1000 20 3 0";
                case MAPINFO_TYPE_ASSAULT:         return "20 0";
@@@ -442,7 -439,7 +439,7 @@@ void _MapInfo_Map_ApplyGametype(string 
  
        if(load_default)
                _MapInfo_Map_ApplyGametype(_MapInfo_GetDefault(pThisType), pWantedType, pThisType, FALSE);
 -      
 +
        if(pWantedType == MAPINFO_TYPE_ASSAULT || pWantedType == MAPINFO_TYPE_ONSLAUGHT || pWantedType == MAPINFO_TYPE_RACE || pWantedType == MAPINFO_TYPE_CTS) // these modes don't use fraglimit
        {
                cvar_set("fraglimit", "0");
                s = cdr(s);
        }
        */
 -      
 +
        // rc = timelimit timelimit_qualification laps laps_teamplay
        if(pWantedType == MAPINFO_TYPE_RACE)
        {
@@@ -694,7 -691,7 +691,7 @@@ float MapInfo_Type_FromString(string t
  string MapInfo_Type_ToString(float t)
  {
        entity e;
 -      if(t == MAPINFO_TYPE_ALL)     
 +      if(t == MAPINFO_TYPE_ALL)
                return "all";
        for(e = MapInfo_Type_first; e; e = e.enemy)
                if(t == e.items)
@@@ -735,12 -732,12 +732,12 @@@ void _MapInfo_Parse_Settemp(string pFil
        o = strstrofs(s, "\"", 0);
        if(o >= 0)
                s = substring(s, 0, o);
 -      
 +
        //   remove // comments
        o = strstrofs(s, "//", 0);
        if(o >= 0)
                s = substring(s, 0, o);
 -      
 +
        //   remove trailing spaces
        while(substring(s, -1, 1) == " ")
                s = substring(s, 0, -2);
                        {
                                for(;;)
                                {
 -                                      if not((s = fgets(fh)))
 +                                      if (!((s = fgets(fh))))
                                                break;
  
                                        // catch different sorts of comments
        }
        else if(t == "")
                print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
 -      else if not(cvar_value_issafe(t))
 +      else if (!cvar_value_issafe(t))
                print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
 -      else if not (cvar_value_issafe(s))
 +      else if (!cvar_value_issafe(s))
                print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if(matchacl(MAPINFO_SETTEMP_ACL_SYSTEM, t) <= 0)
                print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
@@@ -913,7 -910,7 +910,7 @@@ float MapInfo_Get_ByName_NoFallbacks(st
                        else
                                fputs(fh, "// uncomment this if you added turrets: has turrets\n");
                        if(MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_VEHICLES)
 -                              fputs(fh, "has weapons\n");
 +                              fputs(fh, "has vehicles\n");
                        else
                                fputs(fh, "// uncomment this if you added vehicles: has vehicles\n");
                        if(MapInfo_Map_flags & MAPINFO_FLAG_FRUSTRATING)
        _MapInfo_Map_Reset();
        for(;;)
        {
 -              if not((s = fgets(fh)))
 +              if (!((s = fgets(fh))))
                        break;
  
                // catch different sorts of comments
                }
                else if(t == "fog")
                {
 -                      if not(cvar_value_issafe(s))
 +                      if (!cvar_value_issafe(s))
                                print("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
                        else
                                MapInfo_Map_fog = s;
                        t = car(s); s = cdr(s);
                        if(pGametypeToSet) // FIXME is this check right here?
                        {
 -                              if not(cvar_value_issafe(t))
 +                              if (!cvar_value_issafe(t))
                                        print("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
                                else
                                        MapInfo_Map_clientstuff = strcat(
@@@ -1121,7 -1118,7 +1118,7 @@@ float MapInfo_Get_ByName(string pFilena
        if(cvar("g_tdm_on_dm_maps"))
        {
                // if this is set, all DM maps support TDM too
 -              if not(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH)
 +              if (!(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH))
                        if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH)
                                _MapInfo_Map_ApplyGametypeEx ("", pGametypeToSet, MAPINFO_TYPE_TEAM_DEATHMATCH);
        }
@@@ -1251,7 -1248,7 +1248,7 @@@ void MapInfo_LoadMap(string s, float re
        //      print("EMERGENCY: can't play the selected map in the given game mode. Falling back to DM.\n");
        //      MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH);
        //}
 -      
 +
        cvar_settemp_restore();
        if(reinit)
                localcmd(strcat("\nmap ", s, "\n"));
@@@ -1369,11 -1366,11 +1366,11 @@@ float MapInfo_ForbiddenFlags(
        f = MAPINFO_FLAG_FORBIDDEN;
  
  #ifndef MENUQC
 -      if not(cvar("g_maplist_allow_hidden"))
 +      if (!cvar("g_maplist_allow_hidden"))
  #endif
                f |= MAPINFO_FLAG_HIDDEN;
  
 -      if not(cvar("g_maplist_allow_frustrating"))
 +      if (!cvar("g_maplist_allow_frustrating"))
                f |= MAPINFO_FLAG_FRUSTRATING;
  
        return f;
@@@ -313,7 -313,7 +313,7 @@@ void UpdateNotification_URI_Get_Callbac
                n = 0;
        else
                n = tokenizebyseparator(data, "\n");
 -      
 +
        if(n >= 1)
        {
                _Nex_ExtResponseSystem_UpdateTo = argv(0);
@@@ -449,7 -449,7 +449,7 @@@ float preMenuInit(
                boxA = '0.05 0.5 0' + 0.25 * sz_y * eY;
                boxB = '0.95 0.5 0' + 1.25 * sz_y * eY;
                draw_Fill(boxA, boxB - boxA, '1 1 1', 1);
 -              
 +
                boxA += sz * 0.1;
                boxB -= sz * 0.1;
                draw_Fill(boxA, boxB - boxA, '0.1 0.1 0.1', 1);
@@@ -507,7 -507,7 +507,7 @@@ void preMenuDraw(
                draw_CenterText(mid - 1 * line, l1, fs, '1 0 0', 1, 0);
                draw_CenterText(mid - 0 * line, l2, fs, '0 0 1', 1, 0);
        }
 -      if not(campaign_name_previous)
 +      if (!campaign_name_previous)
                campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal
        if(campaign_name == campaign_name_previous)
        {
@@@ -595,7 -595,6 +595,6 @@@ float updateCompression(
  
  // note: include only those that should be in the menu!
  #define GAMETYPES \
-       GAMETYPE(MAPINFO_TYPE_ARENA) \
        GAMETYPE(MAPINFO_TYPE_ASSAULT) \
        GAMETYPE(MAPINFO_TYPE_CTF) \
        GAMETYPE(MAPINFO_TYPE_CA) \
@@@ -616,13 -615,13 +615,13 @@@ float GameType_GetID(float cnt
  {
        float i;
        i = 0;
 -      
 +
        #define GAMETYPE(id) if(i++ == cnt) return id;
        GAMETYPES
        #undef GAMETYPE
  
        unused_float = i;
 -      
 +
        return 0;
  }
  
@@@ -630,31 -629,31 +629,31 @@@ float GameType_GetCount(
  {
        float i;
        i = 0;
 -      
 +
        #define GAMETYPE(id) ++i;
        GAMETYPES
        #undef GAMETYPE
 -      
 +
        return i;
  }
  
  string GameType_GetName(float cnt)
  {
        float i = GameType_GetID(cnt);
 -      
 +
        if(i)
                return MapInfo_Type_ToText(i);
 -      
 +
        return "";
  }
  
  string GameType_GetIcon(float cnt)
  {
        float i = GameType_GetID(cnt);
 -      
 +
        if(i)
                return strcat("gametype_", MapInfo_Type_ToString(i));
 -      
 +
        return "";
  }
  
  {
        float i = GameType_GetID(cnt);
        string s = _MapInfo_GetDefaultEx(i);
 -      
 +
        if(i)
        {
                if(strstrofs(s, "teams", 0) >= 0)
                else
                        return _("free for all");
        }
 -      
 +
        return _("tuba for all");
  }*/
  
@@@ -70,13 -70,8 +70,7 @@@ float autocvar_ekg
  #define autocvar_fraglimit_override cvar("fraglimit_override")
  float autocvar_g_allow_oldnexbeam;
  float autocvar_g_antilag;
 -float autocvar_g_antilag_bullets;
  float autocvar_g_antilag_nudge;
- float autocvar_g_arena_maxspawned;
- float autocvar_g_arena_point_leadlimit;
- float autocvar_g_arena_point_limit;
- float autocvar_g_arena_roundbased;
- float autocvar_g_arena_round_timelimit;
- float autocvar_g_arena_warmup;
  float autocvar_g_balance_armor_blockpercent;
  float autocvar_g_balance_armor_limit;
  float autocvar_g_balance_armor_regen;
diff --combined qcsrc/server/bot/bot.qc
@@@ -363,7 -363,7 +363,7 @@@ void bot_relinkplayerlist(
  
  void bot_clientdisconnect()
  {
 -      if not(IS_BOT_CLIENT(self))
 +      if (!IS_BOT_CLIENT(self))
                return;
        bot_clearqueue(self);
        if(self.cleanname)
  
  void bot_clientconnect()
  {
 -      if not(IS_BOT_CLIENT(self))
 +      if (!IS_BOT_CLIENT(self))
                return;
        self.bot_preferredcolors = self.clientcolors;
        self.bot_nextthink = time - random();
@@@ -551,7 -551,7 +551,7 @@@ float bot_fixcount(
  
        FOR_EACH_REALCLIENT(head)
        {
-               if(IS_PLAYER(head) || g_lms || g_arena || head.caplayer == 1)
+               if(IS_PLAYER(head) || g_lms || head.caplayer == 1)
                        ++activerealplayers;
                ++realplayers;
        }
@@@ -5,7 -5,7 +5,7 @@@
  
  float SV_ParseClientCommand_floodcheck()
  {
 -      if not(timeout_status) // not while paused
 +      if (!timeout_status) // not while paused
        {
                if(time <= (self.cmd_floodtime + autocvar_sv_clientcommand_antispam_time))
                {
@@@ -39,13 -39,13 +39,13 @@@ void ClientCommand_autoswitch(float req
                                return;
                        }
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2autoswitch^7\n");
                case CMD_REQUEST_USAGE:
                {
                        sprint(self, "\nUsage:^3 cmd autoswitch selection\n");
 -                      sprint(self, "  Where 'selection' controls if autoswitch is on or off.\n"); 
 +                      sprint(self, "  Where 'selection' controls if autoswitch is on or off.\n");
                        return;
                }
        }
@@@ -61,7 -61,7 +61,7 @@@ void ClientCommand_checkfail(float requ
                        self.checkfail = 1;
                        return; // never fall through to usage
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2checkfail^7\n");
                case CMD_REQUEST_USAGE:
@@@ -84,27 -84,27 +84,27 @@@ void ClientCommand_clientversion(float 
                                if(IS_CLIENT(self))
                                {
                                        self.version = ((argv(1) == "$gameversion") ? 1 : stof(argv(1)));
 -                                      
 +
                                        if(self.version < autocvar_gameversion_min || self.version > autocvar_gameversion_max)
                                        {
                                                self.version_mismatch = 1;
                                                ClientKill_TeamChange(-2); // observe
 -                                      } 
 -                                      else if(autocvar_g_campaign || autocvar_g_balance_teams) 
 +                                      }
 +                                      else if(autocvar_g_campaign || autocvar_g_balance_teams)
                                        {
                                                //JoinBestTeam(self, FALSE, TRUE);
 -                                      } 
 -                                      else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0)) 
 +                                      }
 +                                      else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0))
                                        {
                                                self.classname = "observer"; // really?
                                                stuffcmd(self, "menu_showteamselect\n");
                                        }
                                }
 -                              
 +
                                return;
                        }
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2clientversion^7\n");
                case CMD_REQUEST_USAGE:
@@@ -124,13 -124,13 +124,13 @@@ void ClientCommand_mv_getpicture(float 
                {
                        if(argv(1) != "")
                        {
 -                              if(intermission_running)                                
 +                              if(intermission_running)
                                        MapVote_SendPicture(stof(argv(1)));
  
                                return;
                        }
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2mv_getpicture^7\n");
                case CMD_REQUEST_USAGE:
        }
  }
  
 -void ClientCommand_join(float request) 
 +void ClientCommand_join(float request)
  {
        switch(request)
        {
                {
                        if(IS_CLIENT(self))
                        {
-                               if(!IS_PLAYER(self) && !lockteams && !g_arena)
+                               if(!IS_PLAYER(self) && !lockteams)
                                {
 -                                      if(nJoinAllowed(self)) 
 +                                      if(nJoinAllowed(self))
                                        {
                                                if(autocvar_g_campaign) { campaign_bots_may_start = 1; }
  
                                                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_JOIN_PLAY, self.netname);
                                                PutClientInServer();
                                        }
 -                                      else 
 +                                      else
                                        {
                                                //player may not join because of g_maxplayers is set
                                                Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT);
                        }
                        return; // never fall through to usage
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -208,7 -208,7 +208,7 @@@ void ClientCommand_ready(float request
                                                }
  
                                                // cannot reset the game while a timeout is active!
 -                                              if not(timeout_status)
 +                                              if (!timeout_status)
                                                        ReadyCount();
                                        } else {
                                                sprint(self, "^1Game has already been restarted\n");
                        }
                        return; // never fall through to usage
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -237,7 -237,7 +237,7 @@@ void ClientCommand_say(float request, f
                        if(argc >= 2) { Say(self, FALSE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
                        return; // never fall through to usage
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -257,7 -257,7 +257,7 @@@ void ClientCommand_say_team(float reque
                        if(argc >= 2) { Say(self, TRUE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
                        return; // never fall through to usage
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -279,11 -279,11 +279,11 @@@ void ClientCommand_selectteam(float req
                                if(IS_CLIENT(self))
                                {
                                        if(teamplay)
 -                                              if not(self.team_forced > 0) 
 -                                                      if not(lockteams) 
 +                                              if(self.team_forced <= 0)
 +                                                      if (!lockteams)
                                                        {
                                                                float selection;
 -                                                              
 +
                                                                switch(argv(1))
                                                                {
                                                                        case "red": selection = NUM_TEAM_1; break;
                                                                        case "yellow": selection = NUM_TEAM_3; break;
                                                                        case "pink": selection = NUM_TEAM_4; break;
                                                                        case "auto": selection = (-1); break;
 -                                                                      
 +
                                                                        default: selection = 0; break;
                                                                }
 -                                                              
 +
                                                                if(selection)
                                                                {
                                                                        if(self.team == selection && self.deadflag == DEAD_NO)
                                        else
                                                sprint(self, "^7selectteam can only be used in teamgames\n");
                                }
 -                              return; 
 +                              return;
                        }
                }
  
@@@ -340,7 -340,7 +340,7 @@@ void ClientCommand_selfstuff(float requ
                                return;
                        }
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2selectteam^7\n");
                case CMD_REQUEST_USAGE:
@@@ -362,19 -362,19 +362,19 @@@ void ClientCommand_sentcvar(float reque
                        {
                                //float tokens;
                                string s;
 -                              
 +
                                if(argc == 2) // undefined cvar: use the default value on the server then
                                {
                                        s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
                                        tokenize_console(s);
                                }
 -                              
 +
                                GetCvars(1);
 -                              
 +
                                return;
                        }
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2sentcvar^7\n");
                case CMD_REQUEST_USAGE:
        }
  }
  
 -void ClientCommand_spectate(float request) 
 +void ClientCommand_spectate(float request)
  {
        switch(request)
        {
                {
                        if(IS_CLIENT(self))
                        {
-                               if(g_arena) { return; }
                                if(g_lms)
                                {
                                        if(self.lms_spectate_warning)
                                                return;
                                        }
                                }
 -                              
 -                              if(IS_PLAYER(self) && autocvar_sv_spectate == 1) 
 +
 +                              if(IS_PLAYER(self) && autocvar_sv_spectate == 1)
                                        ClientKill_TeamChange(-2); // observe
  
                                // in CA, allow a dead player to move to spectators (without that, caplayer!=0 will be moved back to the player list)
                        }
                        return; // never fall through to usage
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -448,7 -447,7 +447,7 @@@ void ClientCommand_suggestmap(float req
                                return;
                        }
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2suggestmap^7\n");
                case CMD_REQUEST_USAGE:
@@@ -470,7 -469,7 +469,7 @@@ void ClientCommand_tell(float request, 
                        {
                                entity tell_to = GetIndexedEntity(argc, 1);
                                float tell_accepted = VerifyClientEntity(tell_to, TRUE, FALSE);
 -                              
 +
                                if(tell_accepted > 0) // the target is a real client
                                {
                                        if(tell_to != self) // and we're allowed to send to them :D
                                        }
                                        else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; }
                                }
 -                              else if(argv(1) == "#0") 
 -                              { 
 +                              else if(argv(1) == "#0")
 +                              {
                                        trigger_magicear_processmessage_forallears(self, -1, world, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)));
                                        return;
                                }
                                else { print_to(self, strcat("tell: ", GetClientErrorString(tell_accepted, argv(1)), ".")); return; }
                        }
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2tell^7\n");
                case CMD_REQUEST_USAGE:
        }
  }
  
 -void ClientCommand_voice(float request, float argc, string command) 
 +void ClientCommand_voice(float request, float argc, string command)
  {
        switch(request)
        {
                                        VoiceMessage(argv(1), substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
                                else
                                        VoiceMessage(argv(1), "");
 -                                      
 +
                                return;
                        }
                }
 -                      
 +
                default:
                        sprint(self, "Incorrect parameters for ^2voice^7\n");
                case CMD_REQUEST_USAGE:
@@@ -537,10 -536,10 +536,10 @@@ void ClientCommand_(float request
        {
                case CMD_REQUEST_COMMAND:
                {
 -                      
 +
                        return; // never fall through to usage
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
        CLIENT_COMMAND("tell", ClientCommand_tell(request, arguments, command), "Send a message directly to a player") \
        CLIENT_COMMAND("voice", ClientCommand_voice(request, arguments, command), "Send voice message via sound") \
        /* nothing */
 -      
 +
  void ClientCommand_macro_help()
  {
        #define CLIENT_COMMAND(name,function,description) \
                { sprint(self, "  ^2", name, "^7: ", description, "\n"); }
 -              
 +
        CLIENT_COMMANDS(0, 0, "")
        #undef CLIENT_COMMAND
 -      
 +
        return;
  }
  
@@@ -591,10 -590,10 +590,10 @@@ float ClientCommand_macro_command(floa
  {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
 -              
 +
        CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef CLIENT_COMMAND
 -      
 +
        return FALSE;
  }
  
@@@ -602,21 -601,21 +601,21 @@@ float ClientCommand_macro_usage(float a
  {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
 -              
 +
        CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef CLIENT_COMMAND
 -      
 +
        return FALSE;
  }
  
  void ClientCommand_macro_write_aliases(float fh)
  {
        #define CLIENT_COMMAND(name,function,description) \
 -              { CMD_Write_Alias("qc_cmd_cmd", name, description); } 
 -              
 +              { CMD_Write_Alias("qc_cmd_cmd", name, description); }
 +
        CLIENT_COMMANDS(0, 0, "")
        #undef CLIENT_COMMAND
 -      
 +
        return;
  }
  
@@@ -632,17 -631,17 +631,17 @@@ void SV_ParseClientCommand(string comma
                return;
  
        float argc = tokenize_console(command);
 -      
 +
        // for the mutator hook system
        cmd_name = strtolower(argv(0));
        cmd_argc = argc;
        cmd_string = command;
 -      
 +
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
 -      // argv:   0    - 1      - 2     - 3 
 +      // argv:   0    - 1      - 2     - 3
        // cmd     vote - master - login - password
 -      
 +
        // for floodcheck
        switch(strtolower(argv(0)))
        {
                case "prespawn": break; // handled by engine in host_cmd.c
                case "sentcvar": break; // handled by server in this file
                case "spawn": break; // handled by engine in host_cmd.c
 -              
 -              default: 
 +
 +              default:
                        if(SV_ParseClientCommand_floodcheck())
                                break; // "TRUE": continue, as we're not flooding yet
                        else
                                return; // "FALSE": not allowed to continue, halt // print("^1ERROR: ^7ANTISPAM CAUGHT: ", command, ".\n");
        }
 -      
 +
        /* NOTE: should this be disabled? It can be spammy perhaps, but hopefully it's okay for now */
 -      if(argv(0) == "help") 
 +      if(argv(0) == "help")
        {
 -              if(argc == 1) 
 +              if(argc == 1)
                {
                        sprint(self, "\nClient networked commands:\n");
                        ClientCommand_macro_help();
 -                      
 +
                        sprint(self, "\nCommon networked commands:\n");
                        CommonCommand_macro_help(self);
 -                      
 +
                        sprint(self, "\nUsage:^3 cmd COMMAND...^7, where possible commands are listed above.\n");
                        sprint(self, "For help about a specific command, type cmd help COMMAND\n");
                        return;
 -              } 
 +              }
                else if(CommonCommand_macro_usage(argc, self)) // Instead of trying to call a command, we're going to see detailed information about it
                {
                        return;
                {
                        return;
                }
 -      } 
 +      }
        else if(MUTATOR_CALLHOOK(SV_ParseClientCommand))
        {
                return; // handled by a mutator
        }
 -      else if(CheatCommand(argc)) 
 +      else if(CheatCommand(argc))
        {
                return; // handled by server/cheats.qc
        }
@@@ -100,7 -100,7 +100,7 @@@ void Nagger_ReadyCounted(
  //  Game logic for voting
  // =======================
  
 -void VoteReset() 
 +void VoteReset()
  {
        entity tmp_player;
  
        vote_called = VOTE_NULL;
        vote_caller = world;
        vote_endtime = 0;
 -      
 +
        vote_called_command = string_null;
        vote_called_display = string_null;
 -      
 +
        vote_parsed_command = string_null;
        vote_parsed_display = string_null;
  
        Nagger_VoteChanged();
  }
  
 -void VoteStop(entity stopper) 
 +void VoteStop(entity stopper)
  {
        bprint("\{1}^2* ^3", GetCallerName(stopper), "^2 stopped ^3", GetCallerName(vote_caller), "^2's vote\n");
        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vstop:", ftos(stopper.playerid))); }
 -      
 +
        // Don't force them to wait for next vote, this way they can e.g. correct their vote.
        if((vote_caller) && (stopper == vote_caller)) { vote_caller.vote_waittime = time + autocvar_sv_vote_stop; }
  
        VoteReset();
  }
  
 -void VoteAccept() 
 +void VoteAccept()
  {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ^1", vote_called_display, "^2 was accepted\n");
 -      
 +
        if((vote_called == VOTE_MASTER) && vote_caller)
                vote_caller.vote_master = 1;
        else
                localcmd(strcat(vote_called_command, "\n"));
 -      
 +
        if(vote_caller) { vote_caller.vote_waittime = 0; } // people like your votes, you don't need to wait to vote again
  
        VoteReset();
        Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_ACCEPT);
  }
  
 -void VoteReject() 
 +void VoteReject()
  {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ", vote_called_display, "^2 was rejected\n");
        VoteReset();
        Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_FAIL);
  }
  
 -void VoteTimeout() 
 +void VoteTimeout()
  {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ", vote_called_display, "^2 timed out\n");
        VoteReset();
@@@ -173,7 -173,7 +173,7 @@@ void VoteSpam(float notvoters, float mi
                ((mincount >= 0) ? strcat("^2 (^1", ftos(mincount), "^2 needed)") : "^2"),
                strcat(", ^1", ftos(vote_abstain_count), "^2 didn't care"),
                strcat(", ^1", ftos(notvoters), strcat("^2 didn't ", ((mincount >= 0) ? "" : "have to "), "vote\n"))));
 -      
 +
        if(autocvar_sv_eventlog)
        {
                GameLogEcho(strcat(
        }
  }
  
 -void VoteCount(float first_count) 
 +void VoteCount(float first_count)
  {
        // declarations
        vote_accept_count = vote_reject_count = vote_abstain_count = 0;
 -      
 -      float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
 +
 +      float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
                                || ((autocvar_sv_vote_nospectators == 1) && (warmup_stage || gameover))
                                || (autocvar_sv_vote_nospectators == 0));
 -                              
 +
        float vote_player_count = 0, notvoters = 0;
        float vote_real_player_count = 0, vote_real_accept_count = 0;
        float vote_real_reject_count = 0, vote_real_abstain_count = 0;
        float vote_needed_of_voted, final_needed_votes;
        float vote_factor_overall, vote_factor_of_voted;
 -      
 +
        entity tmp_player;
  
        Nagger_VoteCountChanged();
 -      
 +
        // add up all the votes from each connected client
        FOR_EACH_REALCLIENT(tmp_player)
        {
                ++vote_player_count;
                if(IS_PLAYER(tmp_player)) { ++vote_real_player_count; }
 -              
 +
                switch(tmp_player.vote_selection)
                {
                        case VOTE_SELECT_REJECT: { ++vote_reject_count; { if(IS_PLAYER(tmp_player)) ++vote_real_reject_count; } break; }
                        default: break;
                }
        }
 -      
 +
        // Check to see if there are enough players on the server to allow master voting... otherwise, vote master could be used for evil.
 -      if((vote_called == VOTE_MASTER) && autocvar_sv_vote_master_playerlimit > vote_player_count) 
 +      if((vote_called == VOTE_MASTER) && autocvar_sv_vote_master_playerlimit > vote_player_count)
        {
                if(vote_caller) { vote_caller.vote_waittime = 0; }
                print_to(vote_caller, "^1There are not enough players on this server to allow you to become vote master.");
                VoteReset();
                return;
        }
 -      
 -      // if spectators aren't allowed to vote and there are players in a match, then only count the players in the vote and ignore spectators. 
 +
 +      // if spectators aren't allowed to vote and there are players in a match, then only count the players in the vote and ignore spectators.
        if(!spectators_allowed && (vote_real_player_count > 0))
        {
                vote_accept_count = vote_real_accept_count;
                vote_abstain_count = vote_real_abstain_count;
                vote_player_count = vote_real_player_count;
        }
 -      
 +
        // people who have no opinion in any way :D
        notvoters = (vote_player_count - vote_accept_count - vote_reject_count - vote_abstain_count);
  
        // determine the goal for the vote to be passed or rejected normally
        vote_factor_overall = bound(0.5, autocvar_sv_vote_majority_factor, 0.999);
        vote_needed_overall = floor((vote_player_count - vote_abstain_count) * vote_factor_overall) + 1;
 -      
 +
        // if the vote times out, determine the amount of votes needed of the people who actually already voted
        vote_factor_of_voted = bound(0.5, autocvar_sv_vote_majority_factor_of_voted, 0.999);
        vote_needed_of_voted = floor((vote_accept_count + vote_reject_count) * vote_factor_of_voted) + 1;
 -      
 +
        // are there any players at all on the server? it could be an admin vote
        if(vote_player_count == 0 && first_count)
        {
 -              VoteSpam(0, -1, "yes"); // no players at all, just accept it 
 +              VoteSpam(0, -1, "yes"); // no players at all, just accept it
                VoteAccept();
                return;
        }
 -      
 -      // since there ARE players, finally calculate the result of the vote    
 +
 +      // since there ARE players, finally calculate the result of the vote
        if(vote_accept_count >= vote_needed_overall)
        {
                VoteSpam(notvoters, -1, "yes"); // there is enough acceptions to pass the vote
                VoteAccept();
                return;
        }
 -      
 +
        if(vote_reject_count > vote_player_count - vote_abstain_count - vote_needed_overall)
        {
                VoteSpam(notvoters, -1, "no"); // there is enough rejections to deny the vote
                VoteReject();
                return;
        }
 -      
 +
        // there is not enough votes in either direction, now lets just calculate what the voters have said
        if(time > vote_endtime)
        {
                final_needed_votes = vote_needed_overall;
 -              
 +
                if(autocvar_sv_vote_majority_factor_of_voted)
                {
                        if(vote_accept_count >= vote_needed_of_voted)
                                VoteAccept();
                                return;
                        }
 -                      
 +
                        if(vote_accept_count + vote_reject_count > 0)
                        {
                                VoteSpam(notvoters, min(vote_needed_overall, vote_needed_of_voted), "no");
                                VoteReject();
                                return;
                        }
 -                      
 +
                        final_needed_votes = min(vote_needed_overall, vote_needed_of_voted);
                }
  
 -              // it didn't pass or fail, so not enough votes to even make a decision. 
 +              // it didn't pass or fail, so not enough votes to even make a decision.
                VoteSpam(notvoters, final_needed_votes, "timeout");
                VoteTimeout();
        }
  }
  
 -void VoteThink() 
 +void VoteThink()
  {
        if(vote_endtime > 0) // a vote was called
        if(time > vote_endtime) // time is up
        {
                VoteCount(FALSE);
        }
 -      
 +
        return;
  }
  
@@@ -391,13 -391,13 +391,13 @@@ void reset_map(float dorespawn
  }
  
  // Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown is set)
 -void ReadyRestart_think() 
 +void ReadyRestart_think()
  {
        restart_mapalreadyrestarted = 1;
        reset_map(TRUE);
        Score_ClearAll();
        remove(self);
 -      
 +
        return;
  }
  
@@@ -455,7 -455,7 +455,7 @@@ void ReadyRestart_force(
        if(autocvar_sv_timeout) { FOR_EACH_REALPLAYER(tmp_player) { tmp_player.allowed_timeouts = autocvar_sv_timeout_number; } }
  
        //reset map immediately if this cvar is not set
 -      if not(autocvar_sv_ready_restart_after_countdown) { reset_map(TRUE); }
 +      if (!autocvar_sv_ready_restart_after_countdown) { reset_map(TRUE); }
  
        if(autocvar_sv_eventlog) { GameLogEcho(":restart"); }
  }
  void ReadyRestart()
  {
        // no arena, assault support yet...
-       if(g_arena | g_assault | gameover | intermission_running | race_completing)
+       if(g_assault | gameover | intermission_running | race_completing)
                localcmd("restart\n");
        else
                localcmd("\nsv_hook_gamerestart\n");
  
        // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
        // Otherwise scores could be manipulated during the countdown.
 -      if not(autocvar_sv_ready_restart_after_countdown) { Score_ClearAll(); }
 +      if (!autocvar_sv_ready_restart_after_countdown) { Score_ClearAll(); }
  
        ReadyRestart_force();
 -      
 +
        return;
  }
  
@@@ -499,12 -499,12 +499,12 @@@ void ReadyCount(
  
        ready_needed_factor = bound(0.5, cvar("g_warmup_majority_factor"), 0.999);
        ready_needed_count = floor(t_players * ready_needed_factor) + 1;
 -      
 +
        if(readycount >= ready_needed_count)
        {
                ReadyRestart();
        }
 -              
 +
        return;
  }
  
  float Votecommand_check_assignment(entity caller, float assignment)
  {
        float from_server = (!caller);
 -      
 -      if((assignment == VC_ASGNMNT_BOTH) 
 -              || ((!from_server && assignment == VC_ASGNMNT_CLIENTONLY) 
 +
 +      if((assignment == VC_ASGNMNT_BOTH)
 +              || ((!from_server && assignment == VC_ASGNMNT_CLIENTONLY)
                || (from_server && assignment == VC_ASGNMNT_SERVERONLY)))
        {
                return TRUE;
        return FALSE;
  }
  
 -string VoteCommand_extractcommand(string input, float startpos, float argc) 
 +string VoteCommand_extractcommand(string input, float startpos, float argc)
  {
        string output;
 -      
 +
        if((argc - 1) < startpos)
                output = "";
        else
                output = substring(input, argv_start_index(startpos), argv_end_index(-1) - argv_start_index(startpos));
 -              
 +
        return output;
  }
  
@@@ -546,30 -546,30 +546,30 @@@ float VoteCommand_checknasty(string vot
                || (strstrofs(vote_command, "\r", 0) >= 0)
                || (strstrofs(vote_command, "$", 0) >= 0))
                return FALSE;
 -              
 +
        return TRUE;
  }
  
  float VoteCommand_checkinlist(string vote_command, string list)
  {
        string l = strcat(" ", list, " ");
 -      
 +
        if(strstrofs(l, strcat(" ", vote_command, " "), 0) >= 0)
                return TRUE;
 -      
 +
        return FALSE;
  }
  
  string ValidateMap(string validated_map, entity caller)
  {
        validated_map = MapInfo_FixName(validated_map);
 -      
 -      if not(validated_map)
 +
 +      if (!validated_map)
        {
                print_to(caller, "This map is not available on this server.");
                return string_null;
        }
 -      
 +
        if(!autocvar_sv_vote_override_mostrecent && caller)
        {
                if(Map_IsRecent(validated_map))
                        return string_null;
                }
        }
 -      
 +
        if(!MapInfo_CheckMap(validated_map))
        {
                print_to(caller, strcat("^1Invalid mapname, \"^3", validated_map, "^1\" does not support the current game mode."));
@@@ -665,7 -665,7 +665,7 @@@ float VoteCommand_checkargs(float start
  float VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc)
  {
        string first_command;
 -      
 +
        first_command = argv(startpos);
  
        /*dprint(sprintf("VoteCommand_parse(): Command: '%s', Length: %f.\n",
        )
                return FALSE;
  
 -      if not(VoteCommand_checkinlist(first_command, vote_list))
 +      if (!VoteCommand_checkinlist(first_command, vote_list))
                return FALSE;
  
 -      if not(VoteCommand_checkargs(startpos, argc))
 +      if (!VoteCommand_checkargs(startpos, argc))
                return FALSE;
  
        switch(first_command) // now go through and parse the proper commands to adjust as needed.
                {
                        entity victim = GetIndexedEntity(argc, (startpos + 1));
                        float accepted = VerifyClientEntity(victim, TRUE, FALSE);
 -                      
 +
                        if(accepted > 0)
                        {
                                string reason = ((argc > next_token) ? substring(vote_command, argv_start_index(next_token), strlen(vote_command) - argv_start_index(next_token)) : "No reason provided");
                                string command_arguments;
 -                              
 +
                                if(first_command == "kickban")
                                        command_arguments = strcat(ftos(autocvar_g_ban_default_bantime), " ", ftos(autocvar_g_ban_default_masksize), " ~");
                                else
                                        command_arguments = reason;
 -                              
 +
                                vote_parsed_command = strcat(first_command, " # ", ftos(num_for_edict(victim)), " ", command_arguments);
                                vote_parsed_display = strcat("^1", vote_command, " (^7", victim.netname, "^1): ", reason);
                        }
                        else { print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n")); return FALSE; }
 -                      
 +
                        break;
                }
 -              
 +
                case "map":
                case "chmap":
                case "gotomap": // re-direct all map selection commands to gotomap
                {
                        vote_command = ValidateMap(argv(startpos + 1), caller);
 -                      if not(vote_command) { return FALSE; }
 +                      if (!vote_command) { return FALSE; }
                        vote_parsed_command = strcat("gotomap ", vote_command);
                        vote_parsed_display = strzone(strcat("^1", vote_parsed_command));
 -                      
 +
                        break;
                }
 -              
 -              default: 
 -              { 
 +
 +              default:
 +              {
                        vote_parsed_command = vote_command;
                        vote_parsed_display = strzone(strcat("^1", vote_command));
 -                      
 -                      break; 
 +
 +                      break;
                }
        }
  
@@@ -747,9 -747,9 +747,9 @@@ void VoteCommand_abstain(float request
        {
                case CMD_REQUEST_COMMAND:
                {
 -                      if not(vote_called) { print_to(caller, "^1No vote called."); }
 -                      else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
 -                      
 +                      if (!vote_called) { print_to(caller, "^1No vote called."); }
 +                      else if(caller.vote_selection != VOTE_SELECT_NULL && !autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
 +
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You abstained from your vote.");
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
 -                      
 +
                        return;
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -777,23 -777,23 +777,23 @@@ void VoteCommand_call(float request, en
        {
                case CMD_REQUEST_COMMAND:
                {
 -                      float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
 -                              || ((autocvar_sv_vote_nospectators == 1) && warmup_stage) 
 +                      float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
 +                              || ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
                                || (autocvar_sv_vote_nospectators == 0));
 -                              
 +
                        float tmp_playercount = 0;
                        entity tmp_player;
 -                      
 +
                        vote_command = VoteCommand_extractcommand(vote_command, 2, argc);
 -                      
 -                      if not(autocvar_sv_vote_call || !caller) { print_to(caller, "^1Vote calling is not allowed."); }
 +
 +                      if(!autocvar_sv_vote_call && caller) { print_to(caller, "^1Vote calling is not allowed."); }
                        else if(!autocvar_sv_vote_gamestart && time < game_starttime) { print_to(caller, "^1Vote calling is not allowed before the match has started."); }
                        else if(vote_called) { print_to(caller, "^1There is already a vote called."); }
                        else if(!spectators_allowed && (caller && !IS_PLAYER(caller))) { print_to(caller, "^1Only players can call a vote."); }
                        else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); }
                        else if(caller && (time < caller.vote_waittime)) { print_to(caller, strcat("^1You have to wait ^2", ftos(ceil(caller.vote_waittime - time)), "^1 seconds before you can again call a vote.")); }
 -                      else if not(VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
 -                      else if not(VoteCommand_parse(caller, vote_command, autocvar_sv_vote_commands, 2, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
 +                      else if (!VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
 +                      else if (!VoteCommand_parse(caller, vote_command, autocvar_sv_vote_commands, 2, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
  
                        else // everything went okay, continue with calling the vote
                        {
                                vote_called_command = strzone(vote_parsed_command);
                                vote_called_display = strzone(vote_parsed_display);
                                vote_endtime = time + autocvar_sv_vote_timeout;
 -                              
 +
                                if(caller)
                                {
                                        caller.vote_selection = VOTE_SELECT_ACCEPT;
                                        caller.vote_waittime = time + autocvar_sv_vote_wait;
                                        msg_entity = caller;
                                }
 -                              
 +
                                FOR_EACH_REALCLIENT(tmp_player) { ++tmp_playercount; }
                                if(tmp_playercount > 1) { Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_CALL); } // don't announce a "vote now" sound if player is alone
 -                              
 +
                                bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2 calls a vote for ", vote_called_display, "\n");
                                if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); }
                                Nagger_VoteChanged();
                                VoteCount(TRUE); // needed if you are the only one
                        }
 -                      
 +
                        return;
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -847,11 -847,11 +847,11 @@@ void VoteCommand_master(float request, 
                                        case "do":
                                        {
                                                vote_command = VoteCommand_extractcommand(vote_command, 3, argc);
 -                                              
 -                                              if not(caller.vote_master) { print_to(caller, "^1You do not have vote master privelages."); }
 -                                              else if not(VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
 -                                              else if not(VoteCommand_parse(caller, vote_command, strcat(autocvar_sv_vote_commands, " ", autocvar_sv_vote_master_commands), 3, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
 -                                              
 +
 +                                              if (!caller.vote_master) { print_to(caller, "^1You do not have vote master privelages."); }
 +                                              else if (!VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
 +                                              else if (!VoteCommand_parse(caller, vote_command, strcat(autocvar_sv_vote_commands, " ", autocvar_sv_vote_master_commands), 3, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
 +
                                                else // everything went okay, proceed with command
                                                {
                                                        localcmd(strcat(vote_parsed_command, "\n"));
                                                        bprint("\{1}^2* ^3", GetCallerName(caller), "^2 used their ^3master^2 status to do \"^2", vote_parsed_display, "^2\".\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vdo:", ftos(caller.playerid), ":", vote_parsed_display)); }
                                                }
 -                                              
 +
                                                return;
                                        }
 -                                      
 +
                                        case "login":
                                        {
 -                                              if not(autocvar_sv_vote_master_password != "") { print_to(caller, "^1Login to vote master is not allowed."); }
 +                                              if(autocvar_sv_vote_master_password == "") { print_to(caller, "^1Login to vote master is not allowed."); }
                                                else if(caller.vote_master) { print_to(caller, "^1You are already logged in as vote master."); }
 -                                              else if not(autocvar_sv_vote_master_password == argv(3)) { print_to(caller, strcat("Rejected vote master login from ", GetCallerName(caller))); }
 +                                              else if(autocvar_sv_vote_master_password != argv(3)) { print_to(caller, strcat("Rejected vote master login from ", GetCallerName(caller))); }
  
                                                else // everything went okay, proceed with giving this player master privilages
                                                {
                                                        bprint("\{1}^2* ^3", GetCallerName(caller), "^2 logged in as ^3master^2\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vlogin:", ftos(caller.playerid))); }
                                                }
 -                                              
 +
                                                return;
                                        }
 -                                      
 +
                                        default: // calling a vote for master
                                        {
 -                                              float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
 -                                                      || ((autocvar_sv_vote_nospectators == 1) && warmup_stage) 
 +                                              float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
 +                                                      || ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
                                                        || (autocvar_sv_vote_nospectators == 0));
 -                                              
 -                                              if not(autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
 +
 +                                              if (!autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
                                                else if(vote_called) { print_to(caller, "^1There is already a vote called."); }
                                                else if(!spectators_allowed && (caller && !IS_PLAYER(caller))) { print_to(caller, "^1Only players can call a vote."); }
                                                else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); }
 -                                              
 +
                                                else // everything went okay, continue with creating vote
                                                {
                                                        vote_caller = caller;
                                                        vote_called_command = strzone("XXX");
                                                        vote_called_display = strzone("^3master");
                                                        vote_endtime = time + autocvar_sv_vote_timeout;
 -                                                      
 +
                                                        caller.vote_selection = VOTE_SELECT_ACCEPT;
                                                        caller.vote_waittime = time + autocvar_sv_vote_wait;
 -                                                      
 +
                                                        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2 calls a vote to become ^3master^2.\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); }
                                                        Nagger_VoteChanged();
                                                        VoteCount(TRUE); // needed if you are the only one
                                                }
 -                                              
 +
                                                return;
                                        }
                                }
                        }
                        else { print_to(caller, "^1Master control of voting is not allowed."); }
 -                      
 +
                        return;
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -934,10 -934,10 +934,10 @@@ void VoteCommand_no(float request, enti
        {
                case CMD_REQUEST_COMMAND:
                {
 -                      if not(vote_called) { print_to(caller, "^1No vote called."); }
 -                      else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
 +                      if (!vote_called) { print_to(caller, "^1No vote called."); }
 +                      else if(caller.vote_selection != VOTE_SELECT_NULL && !autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
                        else if(((caller == vote_caller) || caller.vote_master) && autocvar_sv_vote_no_stops_vote) { VoteStop(caller); }
 -                      
 +
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You rejected the vote.");
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
 -                      
 +
                        return;
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -969,10 -969,10 +969,10 @@@ void VoteCommand_status(float request, 
                                print_to(caller, strcat("^7Vote for ", vote_called_display, "^7 called by ^7", GetCallerName(vote_caller), "^7."));
                        else
                                print_to(caller, "^1No vote called.");
 -                              
 +
                        return;
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -989,13 -989,13 +989,13 @@@ void VoteCommand_stop(float request, en
        {
                case CMD_REQUEST_COMMAND:
                {
 -                      if not(vote_called) { print_to(caller, "^1No vote called."); }
 +                      if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if((caller == vote_caller) || !caller || caller.vote_master) { VoteStop(caller); }
                        else { print_to(caller, "^1You are not allowed to stop that vote."); }
 -                      
 +
                        return;
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -1012,9 -1012,9 +1012,9 @@@ void VoteCommand_yes(float request, ent
        {
                case CMD_REQUEST_COMMAND:
                {
 -                      if not(vote_called) { print_to(caller, "^1No vote called."); }
 -                      else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
 -                      
 +                      if (!vote_called) { print_to(caller, "^1No vote called."); }
 +                      else if(caller.vote_selection != VOTE_SELECT_NULL && autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
 +
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You accepted the vote.");
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
 -                      
 +
                        return;
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -1044,10 -1044,10 +1044,10 @@@ void VoteCommand_(float request
        {
                case CMD_REQUEST_COMMAND:
                {
 -                      
 +
                        return;
                }
 -                      
 +
                default:
                case CMD_REQUEST_USAGE:
                {
@@@ -1085,10 -1085,10 +1085,10 @@@ void VoteCommand_macro_help(entity call
                print_to(caller, "\nVoting commands:\n");
                #define VOTE_COMMAND(name,function,description,assignment) \
                        { if(Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat("  ^2", name, "^7: ", description)); } }
 -                      
 +
                VOTE_COMMANDS(0, caller, 0, "")
                #undef VOTE_COMMAND
 -              
 +
                print_to(caller, strcat("\nUsage:^3 ", command_origin, " vote COMMAND...^7, where possible commands are listed above.\n"));
                print_to(caller, strcat("For help about a specific command, type ", command_origin, " vote help COMMAND"));
                print_to(caller, strcat("\n^7You can call a vote for or execute these commands: ^3", autocvar_sv_vote_commands, "^7 and maybe further ^3arguments^7"));
        {
                #define VOTE_COMMAND(name,function,description,assignment) \
                        { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(2))) { function; return; } } }
 -                      
 +
                VOTE_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "")
                #undef VOTE_COMMAND
        }
 -      
 +
        return;
  }
  
@@@ -1109,10 -1109,10 +1109,10 @@@ float VoteCommand_macro_command(entity 
  {
        #define VOTE_COMMAND(name,function,description,assignment) \
                { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(1))) { function; return TRUE; } } }
 -              
 +
        VOTE_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, vote_command)
        #undef VOTE_COMMAND
 -      
 +
        return FALSE;
  }
  
  //  Main function handling vote commands
  // ======================================
  
 -void VoteCommand(float request, entity caller, float argc, string vote_command) 
 +void VoteCommand(float request, entity caller, float argc, string vote_command)
  {
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
 -      // argv:   0    - 1      - 2     - 3 
 +      // argv:   0    - 1      - 2     - 3
        // cmd     vote - master - login - password
 -      
 +
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                        if(VoteCommand_macro_command(caller, argc, vote_command))
                                return;
                }
 -                      
 +
                default:
                        print_to(caller, strcat(((argv(1) != "") ? strcat("Unknown vote command \"", argv(1), "\"") : "No command provided"), ". For a list of supported commands, try ", GetCommandPrefix(caller), " vote help.\n"));
                case CMD_REQUEST_USAGE:
diff --combined qcsrc/server/g_world.qc
@@@ -253,7 -253,6 +253,6 @@@ void cvar_changes_init(
  
                // mapinfo
                BADCVAR("fraglimit");
-               BADCVAR("g_arena");
                BADCVAR("g_assault");
                BADCVAR("g_ca");
                BADCVAR("g_ca_teams");
  
                // does nothing visible
                BADCVAR("captureleadlimit_override");
-               BADCVAR("g_arena_point_leadlimit");
                BADCVAR("g_balance_kill_delay");
                BADCVAR("g_ca_point_leadlimit");
                BADCVAR("g_ctf_captimerecord_always");
                BADCVAR("g_nix");
                BADCVAR("g_grappling_hook");
                BADCVAR("g_jetpack");
 -              
 +
  #undef BADPREFIX
  #undef BADCVAR
  
@@@ -1401,7 -1399,7 +1399,7 @@@ void DumpStats(float final
                {
                        s = strcat(":player:see-labels:", GetPlayerScoreString(other, 0), ":");
                        s = strcat(s, ftos(rint(time - other.jointime)), ":");
-                       if(IS_PLAYER(other) || g_arena || other.caplayer == 1 || g_lms)
+                       if(IS_PLAYER(other) || other.caplayer == 1 || g_lms)
                                s = strcat(s, ftos(other.team), ":");
                        else
                                s = strcat(s, "spectator:");
@@@ -1514,7 -1512,7 +1512,7 @@@ void NextLevel(
                PlayerStats_AddGlobalInfo(e);
        PlayerStats_Shutdown();
        WeaponStats_Shutdown();
 -      
 +
        Kill_Notification(NOTIF_ALL, world, MSG_CENTER, 0); // kill all centerprints now
  
        if(autocvar_sv_eventlog)
@@@ -1855,7 -1853,7 +1853,7 @@@ float WinningCondition_Scores(float lim
        if(WinningConditionHelper_zeroisworst)
                leadlimit = 0; // not supported in this mode
  
-       if(g_dm || g_tdm || g_arena || g_ca || (g_race && !g_race_qualifying) || g_nexball)
+       if(g_dm || g_tdm || g_ca || (g_race && !g_race_qualifying) || g_nexball)
        // these modes always score in increments of 1, thus this makes sense
        {
                if(leaderfrags != WinningConditionHelper_topscore)
@@@ -2238,7 -2236,7 +2236,7 @@@ string MapVote_Suggest(string m
        if(mapvote_initialized)
                return "Can't suggest - voting is already in progress!";
        m = MapInfo_FixName(m);
 -      if not(m)
 +      if (!m)
                return "The map you suggested is not available on this server.";
        if(!autocvar_g_maplist_votable_suggestions_override_mostrecent)
                if(Map_IsRecent(m))
@@@ -96,7 -96,7 +96,7 @@@ const string STR_OBSERVER = "observer"
  #define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v))
  
  #define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(IS_PLAYER(v))
 -#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if not(IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too
 +#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if (!IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too
  #define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v))
  
  #define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
@@@ -615,7 -615,6 +615,7 @@@ float start_armorvalue
  WepSet warmup_start_weapons;
  WepSet warmup_start_weapons_default;
  WepSet warmup_start_weapons_defaultmask;
 +#define WARMUP_START_WEAPONS ((g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons)
  float warmup_start_ammo_shells;
  float warmup_start_ammo_nails;
  float warmup_start_ammo_rockets;
@@@ -648,16 -647,16 +648,16 @@@ float want_weapon(string cvarprefix, en
                d = 0; // weapon is set a few lines later
        else
                d = (i == WEP_LASER || i == WEP_SHOTGUN);
 -              
 +
        if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook
                d |= (i == WEP_HOOK);
        if(weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED) // never default mutator blocked guns
                d = 0;
  
        var float t = cvar(strcat(cvarprefix, weaponinfo.netname));
 -      
 +
        //print(strcat("want_weapon: ", weaponinfo.netname, " - d: ", ftos(d), ", t: ", ftos(t), ". \n"));
 -      
 +
        // bit order in t:
        // 1: want or not
        // 2: is default?
@@@ -713,7 -712,7 +713,7 @@@ void readplayerstartcvars(
                for (j = WEP_FIRST; j <= WEP_LAST; ++j)
                {
                        e = get_weaponinfo(j);
 -                      if not(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
 +                      if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED))
                                g_weaponarena_weapons |= WepSet_FromWeapon(j);
                }
        }
                for (j = WEP_FIRST; j <= WEP_LAST; ++j)
                {
                        e = get_weaponinfo(j);
 -                      if not(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
 +                      if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED))
                                if (e.spawnflags & WEP_FLAG_NORMAL)
                                        g_weaponarena_weapons |= WepSet_FromWeapon(j);
                }
  
        if(!cvar("g_use_ammunition"))
                start_items |= IT_UNLIMITED_AMMO;
 -      
 +
        if(start_items & IT_UNLIMITED_WEAPON_AMMO)
        {
                start_ammo_rockets = 999;
                        for (i = WEP_FIRST; i <= WEP_LAST; ++i)
                        {
                                e = get_weaponinfo(i);
 -                              float w = want_weapon("g_start_weapon_", e, cvar("g_warmup_allguns"));
 +                              float w = want_weapon("g_start_weapon_", e, g_warmup_allguns);
                                if(w & 1)
                                        warmup_start_weapons |= WepSet_FromWeapon(i);
                                if(w & 2)
                warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
        }
  
 +      WepSet precache_weapons = start_weapons;
 +      if (g_warmup_allguns != 1)
 +              precache_weapons |= warmup_start_weapons;
        for (i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
                e = get_weaponinfo(i);
 -              if((start_weapons | warmup_start_weapons) & WepSet_FromWeapon(i))
 +              if(precache_weapons & WepSet_FromWeapon(i))
                        weapon_action(i, WR_PRECACHE);
        }
  
@@@ -907,7 -903,7 +907,7 @@@ void readlevelcvars(void
        // load mutators
        #define CHECK_MUTATOR_ADD(mut_cvar,mut_name,dependence) \
                { if(cvar(mut_cvar) && dependence) { MUTATOR_ADD(mut_name); } }
 -              
 +
        CHECK_MUTATOR_ADD("g_dodging", mutator_dodging, 1);
        CHECK_MUTATOR_ADD("g_spawn_near_teammate", mutator_spawn_near_teammate, 1);
        CHECK_MUTATOR_ADD("g_physical_items", mutator_physical_items, 1);
        CHECK_MUTATOR_ADD("g_nades", mutator_nades, 1);
        CHECK_MUTATOR_ADD("g_sandbox", sandbox, 1);
        CHECK_MUTATOR_ADD("g_campcheck", mutator_campcheck, 1);
 -      
 +
        #undef CHECK_MUTATOR_ADD
 -      
 +
        if(cvar("sv_allow_fullbright"))
                serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
  
      g_bugrigs_speed_ref = cvar("g_bugrigs_speed_ref");
      g_bugrigs_speed_pow = cvar("g_bugrigs_speed_pow");
      g_bugrigs_steer = cvar("g_bugrigs_steer");
 -      
 +
        g_minstagib = cvar("g_minstagib");
  
        sv_clones = cvar("sv_clones");
        g_warmup_allguns = cvar("g_warmup_allguns");
        g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
  
-       if ((g_race && g_race_qualifying == 2) || g_arena || g_assault || cvar("g_campaign"))
+       if ((g_race && g_race_qualifying == 2) || g_assault || cvar("g_campaign"))
                warmup_stage = 0; // these modes cannot work together, sorry
  
        g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
      if(!g_weapon_stay)
          g_weapon_stay = cvar("g_weapon_stay");
  
 -      if not(warmup_stage)
 +      if (!warmup_stage)
                game_starttime = time + cvar("g_start_delay");
  
        readplayerstartcvars();
@@@ -1645,7 -1641,7 +1645,7 @@@ void adaptor_think2use(
  
  void adaptor_think2use_hittype_splash() // for timed projectile detonation
  {
 -      if not(self.flags & FL_ONGROUND) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
 +      if(!(self.flags & FL_ONGROUND)) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
                self.projectiledeathtype |= HITTYPE_SPLASH;
        adaptor_think2use();
  }
@@@ -1818,7 -1814,7 +1818,7 @@@ string uid2name(string myuid) 
                        db_put(ServerProgsDB, strcat("uid2name", myuid), "");
                }
        }
 -      
 +
        if(s == "")
                s = "^1Unregistered Player";
        return s;
@@@ -2336,7 -2332,7 +2336,7 @@@ void shockwave_spawn(string m, vector o
  
  float randombit(float bits)
  {
 -      if not(bits & (bits-1)) // this ONLY holds for powers of two!
 +      if(!(bits & (bits-1))) // this ONLY holds for powers of two!
                return bits;
  
        float n, f, b, r;
@@@ -2404,7 -2400,7 +2404,7 @@@ float ExponentialFalloff(float mindist
  #else
  string cvar_string_normal(string n)
  {
 -      if not(cvar_type(n) & 1)
 +      if (!(cvar_type(n) & 1))
                backtrace(strcat("Attempt to access undefined cvar: ", n));
        return builtin_cvar_string(n);
  }
diff --combined qcsrc/server/progs.src
@@@ -37,7 -37,6 +37,6 @@@ defs.qh               // Should rename this, it has 
  mutators/base.qh
  mutators/mutators.qh
  mutators/gamemode_assault.qh
- mutators/gamemode_arena.qh
  mutators/gamemode_ca.qh
  mutators/gamemode_ctf.qh
  mutators/gamemode_domination.qh
@@@ -228,7 -227,6 +227,6 @@@ round_handler.q
  
  mutators/base.qc
  mutators/gamemode_assault.qc
- mutators/gamemode_arena.qc
  mutators/gamemode_ca.qc
  mutators/gamemode_ctf.qc
  mutators/gamemode_domination.qc
@@@ -269,3 -267,5 +267,3 @@@ mutators/mutator_campcheck.q
  ../common/test.qc
  ../common/util.qc
  ../common/notifications.qc
 -
 -../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail
diff --combined qcsrc/server/scores.qc
@@@ -334,7 -334,7 +334,7 @@@ float PlayerScore_Add(entity player, fl
        entity s;
  
        if(gameover)
 -      if not(g_lms && scorefield == SP_LMS_RANK) // allow writing to this field in intermission as it is needed for newly joining players
 +      if(!(g_lms && scorefield == SP_LMS_RANK)) // allow writing to this field in intermission as it is needed for newly joining players
                score = 0;
  
        if(!scores_initialized) return 0; // FIXME remove this when everything uses this system
@@@ -532,12 -532,12 +532,12 @@@ void WinningConditionHelper(
                                s = strcat(s, ":human");
                        else
                                s = strcat(s, ":bot");
-                       if(!IS_PLAYER(p) && !g_arena && p.caplayer != 1 && !g_lms)
+                       if(!IS_PLAYER(p) && p.caplayer != 1 && !g_lms)
                                s = strcat(s, ":spectator");
                }
                else
                {
-                       if(IS_PLAYER(p) || g_arena || p.caplayer == 1 || g_lms)
+                       if(IS_PLAYER(p) || p.caplayer == 1 || g_lms)
                                s = GetPlayerScoreString(p, 2);
                        else
                                s = "-666";
@@@ -688,7 -688,7 +688,7 @@@ float PlayerTeamScore_Compare(entity p1
                if(teams < 0)
                        return 0;
        }
 -      
 +
        return PlayerScore_Compare(p1.scorekeeper, p2.scorekeeper, strict);
  }
  
@@@ -712,7 -712,7 +712,7 @@@ entity PlayerScore_Sort(.float field, f
                plist = p;
        }
        // Now plist points to the whole list.
 -      
 +
        pfirst = plast = world;
  
        i = j = 0;
  
                pbest.field = j;
  
 -              if not(pfirst)
 +              if (!pfirst)
                        pfirst = pbest;
                if(plast)
                        plast.chain = pbest;
@@@ -765,7 -765,7 +765,7 @@@ float TeamScore_GetCompareValue(float t
        }
  
        sk = teamscorekeepers[t - 1];
 -      if not(sk)
 +      if (!sk)
                return -999999999;
        s = sk.teamscores_primary;
        if(teamscores_flags_primary & SFL_ZERO_IS_WORST)
@@@ -813,7 -813,7 +813,7 @@@ void Score_NicePrint_Team(entity to, fl
                s = "Scores:";
  
        s = strcat(s, strpad(max(0, NAMEWIDTH - strlennocol(s)), ""));
 -      
 +
        for(i = 0; i < MAX_SCORE; ++i)
                if(scores_label[i] != "")
                {
@@@ -847,7 -847,7 +847,7 @@@ void Score_NicePrint_Player(entity to, 
                        break;
                }
        }
 -      
 +
        for(i = 0; i < MAX_SCORE; ++i)
                if(scores_label[i] != "")
                {
@@@ -896,12 -896,12 +896,12 @@@ void Score_NicePrint(entity to
                t = p.team;
                p = p.chain;
        }
 -      
 +
        t = 0;
        FOR_EACH_CLIENT(p)
 -      if not(IS_PLAYER(p))
 +      if (!IS_PLAYER(p))
        {
 -              if not(t)
 +              if (!t)
                        Score_NicePrint_Spectators(to);
                Score_NicePrint_Spectator(to, p);
                t = 1;
@@@ -13,7 -13,7 +13,7 @@@ float SpawnPoint_Send(entity to, float 
  float SpawnEvent_Send(entity to, float sf)
  {
        float send;
 -      
 +
        WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNEVENT);
  
        if(autocvar_g_spawn_alloweffects)
@@@ -318,12 -318,7 +318,7 @@@ entity SelectSpawnPoint (float anypoint
        }
        else
        {
-               float mindist;
-               if(g_arena && arena_roundbased)
-                       mindist = 800;
-               else
-                       mindist = 100;
-               firstspot = Spawn_FilterOutBadSpots(firstspot, mindist, teamcheck);
+               firstspot = Spawn_FilterOutBadSpots(firstspot, 100, teamcheck);
  
                // there is 50/50 chance of choosing a random spot or the furthest spot
                // (this means that roughly every other spawn will be furthest, so you
diff --combined qcsrc/server/t_quake3.qc
@@@ -142,7 -142,7 +142,7 @@@ float DoesQ3ARemoveThisEntity(
                        return 1;
  
        if(self.notta)
 -              if not(!teamplay || g_tdm || g_ctf)
 +              if (!(!teamplay || g_tdm || g_ctf))
                        return 1;
  
        if(self.notsingle)
                gametypename = "ffa";
                if(teamplay)
                        gametypename = "team";
-               if(g_arena)
-                       gametypename = "tournament";
                if(g_ctf)
                        gametypename = "ctf";
                if(maxclients == 1)
diff --combined qcsrc/server/teamplay.qc
@@@ -56,7 -56,7 +56,7 @@@ void InitGameplayMode(
        teamplay = 0;
        serverflags &= ~SERVERFLAG_TEAMPLAY;
  
 -      if not(cvar_value_issafe(world.fog))
 +      if (!cvar_value_issafe(world.fog))
        {
                print("The current map contains a potentially harmful fog setting, ignored\n");
                world.fog = string_null;
                MUTATOR_ADD(gamemode_lms);
        }
  
-       if(g_arena)
-       {
-               fraglimit_override = autocvar_g_arena_point_limit;
-               leadlimit_override = autocvar_g_arena_point_leadlimit;
-               MUTATOR_ADD(gamemode_arena);
-       }
        if(g_ca)
        {
                ActivateTeamplay();
          have_team_spawns = -1; // request team spawns
            MUTATOR_ADD(gamemode_nexball);
        }
 -        
 +
        if(g_keepaway)
        {
                MUTATOR_ADD(gamemode_keepaway);
@@@ -600,7 -593,7 +593,7 @@@ float TeamSmallerEqThanTeam(float ta, f
                        cb -= cbb * 0.999;
                }
        }
 -      
 +
        // keep teams alive (teams of size 0 always count as smaller, ignoring score)
        if(ca < 1)
                if(cb >= 1)
@@@ -671,7 -664,7 +664,7 @@@ float FindSmallestTeam(entity pl, floa
                GetTeamCounts(world);
  
        RandomSelection_Init();
 -      
 +
        t = 1;
        if(TeamSmallerEqThanTeam(2, t, pl))
                t = 2;