]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 88fc3b5c651c1e0076a8d490b1a3d3efe245cb4d..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);
index 4d0745a520a37ce6eecfbdffcf9627403ec06d9c..11dab52a30e6651d99cbf3b4527edebfea00226b 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)) {