]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
setcursormode in mapvote screen too
authorterencehill <piuntn@gmail.com>
Sun, 29 Jan 2012 15:44:35 +0000 (16:44 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 29 Jan 2012 15:44:35 +0000 (16:44 +0100)
qcsrc/client/View.qc
qcsrc/client/mapvoting.qc

index 383f957a815c43339fef982f2787516eec225ce6..46770d051ffb262d2e5dff8c2736ffc09d50c5b8 100644 (file)
@@ -463,9 +463,9 @@ void CSQC_UpdateView(float w, float h)
                        eventchase_current_distance = 0; // start from 0 next time
                }
        }
-       
+
        // do lockview after event chase camera so that it still applies whenever necessary.
-       if(autocvar_cl_lockview || intermission > 1)
+       if(autocvar_cl_lockview)
        {
                setproperty(VF_ORIGIN, freeze_org);
                setproperty(VF_ANGLES, freeze_ang);
index 4cb8dad05fff509e7a905ffc6627a850df8459fb..cf5236af1aca01171620ac1223a5f207cb772dfa 100644 (file)
@@ -174,11 +174,6 @@ void MapVote_Draw()
        if(!mv_active)
                return;
 
-       mv_mousepos = mv_mousepos + getmousepos();
-
-       mv_mousepos_x = bound(0, mv_mousepos_x, vid_conwidth);
-       mv_mousepos_y = bound(0, mv_mousepos_y, vid_conheight);
-
        center = (vid_conwidth - 1)/2;
        xmin = vid_conwidth*0.05; // 5% border must suffice
        xmax = vid_conwidth - xmin;
@@ -333,8 +328,7 @@ void MapVote_Init()
        precache_sound ("misc/invshot.wav");
 
        mv_active = 1;
-
-       mv_mousepos = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
+       setcursormode(1);
        mv_selection = -1;
 
        for(n_ssdirs = 0; ; ++n_ssdirs)
@@ -404,6 +398,13 @@ float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary)
        if (!mv_active)
                return false;
 
+       if(bInputType == 3)
+       {
+               mv_mousepos_x = nPrimary;
+               mv_mousepos_y = nSecondary;
+               return true;
+       }
+
        if (bInputType != 0)
                return false;