]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Don't draw viewlocation cursor or force angles as a spectator
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index d99a186d79e6cc8f23d19727c51f7330d815b8ef..95a437e926dac488d40dfe96b8e879c5df7bcaf7 100644 (file)
@@ -1482,6 +1482,9 @@ void HUD_Draw(entity this)
 
 void ViewLocation_Mouse()
 {
+       if(spectatee_status)
+               return; // don't draw it as spectator!
+
        viewloc_mousepos += getmousepos() * autocvar_menu_mouse_speed;
        viewloc_mousepos.x = bound(0, viewloc_mousepos.x, vid_conwidth);
        viewloc_mousepos.y = bound(0, viewloc_mousepos.y, vid_conheight);
@@ -2074,7 +2077,7 @@ void CSQC_UpdateView(entity this, float w, float h)
                // reticle_type is changed to the item we are zooming / aiming with, to decide which reticle to use
                // It must be a persisted float for fading out to work properly (you let go of the zoom button for
                // the view to go back to normal, so reticle_type would become 0 as we fade out)
-               if(spectatee_status || is_dead || hud != HUD_NORMAL)
+               if(spectatee_status || is_dead || hud != HUD_NORMAL || local_player.viewloc)
                {
                        // no zoom reticle while dead
                        reticle_type = 0;