]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
If cl_lockview is enabled disable crosshair, spawn zoom effect and velocity zoom...
authorterencehill <piuntn@gmail.com>
Tue, 2 Jun 2020 08:29:18 +0000 (10:29 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 2 Jun 2020 08:29:18 +0000 (10:29 +0200)
qcsrc/client/main.qc
qcsrc/client/view.qc

index e4661468d8a8c050f44d19aea9973131b0023f6b..a049b98f2137ce3a772cbf12b3ab53ce1202c25a 100644 (file)
@@ -754,8 +754,11 @@ NET_HANDLE(ENT_CLIENT_SPAWNEVENT, bool is_new)
        // local spawn actions
        if(is_new && (!entnum || (entnum == player_localentnum)))
        {
-               zoomin_effect = 1;
-               current_viewzoom = (1 / bound(1, autocvar_cl_spawnzoom_factor, 16));
+               if(autocvar_cl_spawnzoom && !autocvar_cl_lockview)
+               {
+                       zoomin_effect = 1;
+                       current_viewzoom = (1 / bound(1, autocvar_cl_spawnzoom_factor, 16));
+               }
 
                if(autocvar_cl_unpress_zoom_on_spawn)
                {
index 7a8b5e705f7846bb7fecfc361a36cdb0ff0f2889..9a753f5ffbdf9b9df193cf9f659c4dc49c6cde7b 100644 (file)
@@ -486,7 +486,7 @@ vector GetCurrentFov(float fov)
        else
                setsensitivityscale(1);
 
-       if(autocvar_cl_velocityzoom_enabled && autocvar_cl_velocityzoom_type) // _type = 0 disables velocity zoom too
+       if(autocvar_cl_velocityzoom_enabled && autocvar_cl_velocityzoom_type && !autocvar_cl_lockview) // _type = 0 disables velocity zoom too
        {
                if (intermission || (spectatee_status > 0 && STAT(CAMERA_SPECTATOR) == 2))
                        curspeed = 0;
@@ -1085,9 +1085,9 @@ void HUD_Crosshair(entity this)
 
        float f, i, j;
        vector v;
-       if(!scoreboard_active && !camera_active && intermission != 2 && !STAT(GAME_STOPPED) &&
-               spectatee_status != -1 && (!csqcplayer.viewloc || (!spectatee_status && (csqcplayer.viewloc.spawnflags & VIEWLOC_FREEAIM))) && !MUTATOR_CALLHOOK(DrawCrosshair) &&
-               !HUD_MinigameMenu_IsOpened() )
+       if(!scoreboard_active && !camera_active && intermission != 2 && !STAT(GAME_STOPPED) && !autocvar_cl_lockview
+               && spectatee_status != -1 && (!csqcplayer.viewloc || (!spectatee_status && (csqcplayer.viewloc.spawnflags & VIEWLOC_FREEAIM))) && !MUTATOR_CALLHOOK(DrawCrosshair)
+               && !HUD_MinigameMenu_IsOpened())
        {
                if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
                        return;