]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Don't continue the loop if a valid reticle image is chosen, hopefully fixes a bad...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 04107188696d4c1c1f8879caafa5c80cb9e4b383..63a0aef279706cdc7ec78d7c649c30734ee12856 100644 (file)
@@ -759,7 +759,7 @@ bool WantEventchase(entity this)
 {
        if(autocvar_cl_orthoview)
                return false;
-       if(intermission)
+       if(STAT(GAMEOVER) || intermission)
                return true;
        if(this.viewloc)
                return true;
@@ -961,7 +961,7 @@ void HUD_Crosshair(entity this)
 {
        float f, i, j;
        vector v;
-       if(!scoreboard_active && !camera_active && intermission != 2 &&
+       if(!scoreboard_active && !camera_active && intermission != 2 && !STAT(GAMEOVER) &&
                spectatee_status != -1 && !csqcplayer.viewloc && !MUTATOR_CALLHOOK(DrawCrosshair) &&
                !HUD_MinigameMenu_IsOpened() )
        {
@@ -1762,8 +1762,8 @@ void CSQC_UpdateView(entity this, float w, float h)
        if(!postinit)
                PostInit();
 
-       if(intermission && !gameover_time)
-               gameover_time = time;
+       if(intermission && !intermission_time)
+               intermission_time = time;
 
        if(intermission && !isdemo() && !(calledhooks & HOOK_END))
        {
@@ -1962,8 +1962,11 @@ void CSQC_UpdateView(entity this, float w, float h)
                        if(wep != WEP_Null && wep.wr_zoom)
                        {
                                bool do_zoom = wep.wr_zoom(wep, NULL);
-                               if(wep.w_reticle && wep.w_reticle != "")
+                               if(wep.w_reticle != "")
+                               {
                                        reticle_image = wep.w_reticle;
+                                       break; // we can only draw 1 reticle
+                               }
                                wep_zoomed += do_zoom;
                        }
                }
@@ -1978,7 +1981,7 @@ void CSQC_UpdateView(entity this, float w, float h)
                }
                else if(wep_zoomed && autocvar_cl_reticle_weapon)
                {
-                       if(reticle_image && reticle_image != "") { reticle_type = 2; }
+                       if(reticle_image != "") { reticle_type = 2; }
                        else { reticle_type = 0; }
                }
                else if(button_zoom || zoomscript_caught)