From: Mario Date: Sat, 30 Dec 2017 06:24:20 +0000 (+1000) Subject: Fix stuck reticle in side-scrolling mode, and partially fix aiming in free-aim side... X-Git-Tag: xonotic-v0.8.5~2398 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=120c6964faf131d8b8d3c2af6fb80acac303efa9;p=xonotic%2Fxonotic-data.pk3dir.git Fix stuck reticle in side-scrolling mode, and partially fix aiming in free-aim side-scrolling mode --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index d99a186d7..88fc3b5c6 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -2074,7 +2074,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; diff --git a/qcsrc/common/viewloc.qc b/qcsrc/common/viewloc.qc index 6eec99ab2..38a925198 100644 --- a/qcsrc/common/viewloc.qc +++ b/qcsrc/common/viewloc.qc @@ -188,7 +188,7 @@ void viewloc_SetViewLocation() //vector bpos = view.origin + view.view_ofs + backward * max_shot_distance; vector mpos = CursorToWorldCoord(viewloc_mousepos); //vector pos_bounds = vec_bounds_in(mpos, fpos, bpos); - setproperty(VF_CL_VIEWANGLES, aim_vec(view.origin + view.view_ofs, mpos)); + setproperty(VF_CL_VIEWANGLES, aim_vec(view.origin + view.view_ofs, vec3(view.origin_x + view.view_ofs_x, mpos.y, mpos.z))); } } }