]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Merge branch 'terencehill/mapvote_layout_changes' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 3ffb4066c5080c2850743d747af51bf07a7aed70..b58f1f83214e28445afc5e0c91d4114c049dffd0 100644 (file)
@@ -8,18 +8,18 @@
 #include "noise.qh"
 #include "scoreboard.qh"
 #include "shownames.qh"
-#include "target_music.qh"
-#include "vehicles/vehicles.qh"
+#include "vehicles/all.qh"
 #include "waypointsprites.qh"
 
 #include "../common/constants.qh"
 #include "../common/mapinfo.qh"
 #include "../common/nades.qh"
 #include "../common/stats.qh"
+#include "../common/triggers/target/music.qh"
 #include "../common/teams.qh"
 #include "../common/util.qh"
 
-#include "../common/weapons/weapons.qh"
+#include "../common/weapons/all.qh"
 
 #include "../csqcmodellib/cl_player.qh"
 
@@ -124,7 +124,7 @@ vector GetCurrentFov(float fov)
 
        zoomsensitivity = autocvar_cl_zoomsensitivity;
        zoomfactor = autocvar_cl_zoomfactor;
-       if(zoomfactor < 1 || zoomfactor > 16)
+       if(zoomfactor < 1 || zoomfactor > 30)
                zoomfactor = 2.5;
        zoomspeed = autocvar_cl_zoomspeed;
        if(zoomspeed >= 0)
@@ -155,7 +155,7 @@ vector GetCurrentFov(float fov)
        }
        else if(autocvar_cl_spawnzoom && zoomin_effect)
        {
-               float spawnzoomfactor = bound(1, autocvar_cl_spawnzoom_factor, 16);
+               float spawnzoomfactor = bound(1, autocvar_cl_spawnzoom_factor, 30);
 
                current_viewzoom += (autocvar_cl_spawnzoom_speed * (spawnzoomfactor - current_viewzoom) * drawframetime);
                current_viewzoom = bound(1 / spawnzoomfactor, current_viewzoom, 1);
@@ -1054,7 +1054,11 @@ void CSQC_UpdateView(float w, float h)
 
        CSQCPlayer_SetCamera();
 
-       myteam = GetPlayerColor(player_localentnum - 1);
+       if(player_localentnum <= maxclients) // is it a client?
+               current_player = player_localentnum - 1;
+       else // then player_localentnum is the vehicle I'm driving
+               current_player = player_localnum;
+       myteam = GetPlayerColor(current_player);
 
        if(myteam != prev_myteam)
        {
@@ -1811,13 +1815,9 @@ void CSQC_common_hud(void)
        HUD_Main(); // always run these functions for alpha checks
        HUD_DrawScoreboard();
 
-       if (scoreboard_active) // scoreboard/accuracy
+       // scoreboard/accuracy, map/gametype voting screen
+       if (scoreboard_active || intermission == 2)
                HUD_Reset();
-       else if (intermission == 2) // map voting screen
-       {
-               MapVote_Draw();
-               HUD_Reset();
-       }
 }