Don't draw viewlocation cursor or force angles as a spectator
authorMario <mario@smbclan.net>
Mon, 1 Jan 2018 14:17:00 +0000 (00:17 +1000)
committerMario <mario@smbclan.net>
Mon, 1 Jan 2018 14:17:00 +0000 (00:17 +1000)
qcsrc/client/view.qc
qcsrc/common/viewloc.qc

index 88fc3b5..95a437e 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);
index 4d0745a..11dab52 100644 (file)
@@ -149,6 +149,9 @@ void viewloc_SetViewLocation()
                setproperty(VF_ORIGIN, camera_position);
                setproperty(VF_ANGLES, camera_angle);
 
+               if(spectatee_status)
+                       return; // if spectating, don't replace angles or inputs!
+
                if (have_sidescroll) {
                        vector view_angle = view.angles;
                        if (!(view.viewloc.spawnflags & VIEWLOC_FREEAIM)) {