From: Mario Date: Mon, 1 Jan 2018 14:17:00 +0000 (+1000) Subject: Don't draw viewlocation cursor or force angles as a spectator X-Git-Tag: xonotic-v0.8.5~2391 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e6a33700efe08f426d28269b0764fbb38f6cf286;p=xonotic%2Fxonotic-data.pk3dir.git Don't draw viewlocation cursor or force angles as a spectator --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 88fc3b5c6..95a437e92 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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); diff --git a/qcsrc/common/viewloc.qc b/qcsrc/common/viewloc.qc index 4d0745a52..11dab52a3 100644 --- a/qcsrc/common/viewloc.qc +++ b/qcsrc/common/viewloc.qc @@ -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)) {