]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Fix #2448 "HUD editor cursor stuck after exit"
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 22618d6431d61f1419d60eac34612a039f588565..baf749ff47ee44d929a6329f0e8602e589e836cb 100644 (file)
@@ -1420,10 +1420,10 @@ void HUD_Crosshair(entity this)
                                }
 
                                if (autocvar_crosshair_ring_inner && ring_inner_value) // lets draw a ring inside a ring so you can ring while you ring
-                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * ring_scale, ring_inner_image, ring_inner_value, ring_inner_rgb, wcross_alpha * ring_inner_alpha, DRAWFLAG_ADDITIVE);
+                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * wcross_resolution * ring_scale, ring_inner_image, ring_inner_value, ring_inner_rgb, wcross_alpha * ring_inner_alpha, DRAWFLAG_ADDITIVE);
 
                                if (ring_value)
-                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * ring_scale, ring_image, ring_value, ring_rgb, wcross_alpha * ring_alpha, DRAWFLAG_ADDITIVE);
+                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * wcross_resolution * ring_scale, ring_image, ring_value, ring_rgb, wcross_alpha * ring_alpha, DRAWFLAG_ADDITIVE);
                        }
 
 #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
@@ -1635,6 +1635,7 @@ void ViewLocation_Mouse()
        viewloc_mousepos.y = bound(0, viewloc_mousepos.y, vid_conheight);
 
        //float cursor_alpha = 1 - autocvar__menu_alpha;
+       //cursor_type = CURSOR_NORMAL;
        //draw_cursor(viewloc_mousepos, '0.5 0.5 0', "/cursor_move", '1 1 1', cursor_alpha);
 }
 
@@ -1675,6 +1676,7 @@ void HUD_Mouse(entity player)
        if(!autocvar_hud_cursormode)
                update_mousepos();
 
+       cursor_type = CURSOR_NORMAL;
        if(autocvar__hud_configure)
                HUD_Panel_Mouse();
        else
@@ -2329,6 +2331,8 @@ void CSQC_UpdateView(entity this, float w, float h)
        vid_width = vf_size.x;
        vid_height = vf_size.y;
 
+       ticrate = STAT(MOVEVARS_TICRATE) * STAT(MOVEVARS_TIMESCALE);
+
        WaypointSprite_Load();
 
        CSQCPlayer_SetCamera();
@@ -2339,8 +2343,6 @@ void CSQC_UpdateView(entity this, float w, float h)
                current_player = player_localnum;
        myteam = entcs_GetTeam(current_player);
 
-       ticrate = STAT(MOVEVARS_TICRATE) * STAT(MOVEVARS_TIMESCALE);
-
        // abused multiple places below
        entity local_player = ((csqcplayer) ? csqcplayer : CSQCModel_server2csqc(player_localentnum - 1));
        if(!local_player)
@@ -2445,10 +2447,7 @@ void CSQC_UpdateView(entity this, float w, float h)
        addentities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS); // TODO: .health is used in cl_deathfade (a feature we have turned off currently)
        renderscene();
 
-       // now switch to 2D drawing mode by calling a 2D drawing function
-       // then polygon drawing will draw as 2D stuff, and NOT get queued until the
-       // next R_RenderScene call
-       drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
+       // Now the the scene has been rendered, begin with the 2D drawing functions
 
        View_NightVision();
        DrawReticle(local_player);