]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/mapvoting.qc
Makefile: use `-I.`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / mapvoting.qc
index 3511c743f05b7478a6436c884775742962532b72..48d0843b0913c35ceca971a886b90f84bdc600a4 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;
@@ -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(self);
        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();