]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix stuck reticle in side-scrolling mode, and partially fix aiming in free-aim side...
authorMario <mario@smbclan.net>
Sat, 30 Dec 2017 06:24:20 +0000 (16:24 +1000)
committerMario <mario@smbclan.net>
Sat, 30 Dec 2017 06:24:20 +0000 (16:24 +1000)
qcsrc/client/view.qc
qcsrc/common/viewloc.qc

index d99a186d79e6cc8f23d19727c51f7330d815b8ef..88fc3b5c651c1e0076a8d490b1a3d3efe245cb4d 100644 (file)
@@ -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;
index 6eec99ab254d6ba56bf9ee33c666dd9b044390dc..38a925198a7b59abbecc26f14a8aebd39571ddfb 100644 (file)
@@ -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)));
                        }
                }
        }