]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/mapvoting.qc
Clean up some dangling definitions on the client side
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / mapvoting.qc
index 29728dfde6d07cd781c19ae75d199b038c1c1a85..8412bd757964ffdec471381121b8a923af5a152c 100644 (file)
@@ -1,5 +1,8 @@
 #include "mapvoting.qh"
 
+#include "autocvars.qh"
+#include "miscfunctions.qh"
+#include "defs.qh"
 #include "hud/_mod.qh"
 #include "hud/panel/scoreboard.qh"
 
@@ -318,7 +321,6 @@ float MapVote_Selection(vector topleft, vector cellsize, float rows, float colum
        return mv_mouse_selection;
 }
 
-vector HUD_GetTableSize_BestItemAR(int item_count, vector psize, float item_aspect);
 void MapVote_Draw()
 {
        string map;
@@ -494,7 +496,7 @@ void Cmd_MapVote_MapDownload(int argc)
 
        if(argc != 2 || !mv_pk3list)
        {
-               LOG_INFO(_("mv_mapdownload: ^3You're not supposed to use this command on your own!\n"));
+               LOG_INFO(_("mv_mapdownload: ^3You're not supposed to use this command on your own!"));
                return;
        }
 
@@ -504,7 +506,7 @@ void Cmd_MapVote_MapDownload(int argc)
                        break;
 
        if(!pak || pak.sv_entnum != id) {
-               LOG_INFO(_("^1Error:^7 Couldn't find pak index.\n"));
+               LOG_INFO(_("^1Error:^7 Couldn't find pak index."));
                return;
        }
 
@@ -513,7 +515,7 @@ void Cmd_MapVote_MapDownload(int argc)
                mv_preview[id] = true;
                return;
        } else {
-               LOG_INFO(_("Requesting preview...\n"));
+               LOG_INFO(_("Requesting preview..."));
                localcmd(strcat("\ncmd mv_getpicture ", ftos(id), "\n"));
        }
 }
@@ -560,7 +562,7 @@ void MapVote_ReadMask()
        int i;
        if ( mv_num_maps < 24 )
        {
-               int mask, power;
+               int mask;
                if(mv_num_maps < 8)
                        mask = ReadByte();
                else if(mv_num_maps < 16)
@@ -568,9 +570,9 @@ void MapVote_ReadMask()
                else
                        mask = ReadLong();
 
-               for(i = 0, power = 1; i < mv_num_maps; ++i, power *= 2)
+               for(i = 0; i < mv_num_maps; ++i)
                {
-                       if ( mask & power )
+                       if (mask & BIT(i))
                                mv_flags[i] |= GTV_AVAILABLE;
                        else
                                mv_flags[i] &= ~GTV_AVAILABLE;