From: terencehill Date: Sun, 29 Jan 2012 15:44:35 +0000 (+0100) Subject: setcursormode in mapvote screen too X-Git-Tag: xonotic-v0.7.0~196^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0e238da8ab61087f6b6a833b29425cf88f92461e;p=xonotic%2Fxonotic-data.pk3dir.git setcursormode in mapvote screen too --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 383f957a8..46770d051 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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); diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 4cb8dad05..cf5236af1 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -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;