]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/mapvoting.qc
Load csqc cursor attributes from the current menu skin file rather than using constan...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / mapvoting.qc
index 037d906fbe09c1ec9f3a2b0f91a77be42c609e4a..7071231651b2b69149bbbd2bf226abfe1df95496 100644 (file)
@@ -1,13 +1,9 @@
 #include "mapvoting.qh"
-#include "_all.qh"
 
-#include "hud.qh"
+#include "hud/all.qh"
 #include "scoreboard.qh"
 
-#include "../common/mapinfo.qh"
-#include "../common/util.qh"
-
-#include "../dpdefs/keycodes.qh"
+#include <common/mapinfo.qh>
 
 
 int mv_num_maps;
@@ -486,7 +482,7 @@ void MapVote_Draw()
                MapVote_DrawAbstain(pos, dist.x, xmax - xmin, tmp, i);
        }
 
-       drawpic(mv_mousepos, strcat("gfx/menu/", autocvar_menu_skin, "/cursor.tga"), '32 32 0', '1 1 1', 1 - autocvar__menu_alpha, DRAWFLAG_NORMAL);
+       draw_cursor_normal(mv_mousepos, '1 1 1', 1 - autocvar__menu_alpha);
 }
 
 void Cmd_MapVote_MapDownload(float argc)
@@ -495,7 +491,7 @@ void Cmd_MapVote_MapDownload(float argc)
 
        if(argc != 2 || !mv_pk3list)
        {
-               print(_("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!\n"));
                return;
        }
 
@@ -505,7 +501,7 @@ void Cmd_MapVote_MapDownload(float argc)
                        break;
 
        if(!pak || pak.sv_entnum != id) {
-               print(_("^1Error:^7 Couldn't find pak index.\n"));
+               LOG_INFO(_("^1Error:^7 Couldn't find pak index.\n"));
                return;
        }
 
@@ -514,7 +510,7 @@ void Cmd_MapVote_MapDownload(float argc)
                mv_preview[id] = true;
                return;
        } else {
-               print(_("Requesting preview...\n"));
+               LOG_INFO(_("Requesting preview...\n"));
                localcmd(strcat("\ncmd mv_getpicture ", ftos(id), "\n"));
        }
 }
@@ -630,8 +626,6 @@ void GameTypeVote_ReadOption(int i)
 
 void MapVote_Init()
 {
-       precache_sound ("misc/invshot.wav");
-
        mv_active = 1;
        if(autocvar_hud_cursormode) { setcursormode(1); }
        else { mv_mousepos = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight; }
@@ -857,9 +851,11 @@ void MapVote_UpdateVotes()
        mv_ownvote = ReadByte()-1;
 }
 
-void Ent_MapVote()
+NET_HANDLE(ENT_CLIENT_MAPVOTE, bool isnew)
 {
+       make_pure(this);
        int sf = ReadByte();
+       return = true;
 
        if(sf & 1)
                MapVote_Init();
@@ -871,6 +867,12 @@ void Ent_MapVote()
                MapVote_UpdateVotes();
 }
 
+NET_HANDLE(TE_CSQC_PICTURE, bool isNew)
+{
+       Net_MapVote_Picture();
+       return true;
+}
+
 void Net_MapVote_Picture()
 {
        int type = ReadByte();