]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Merge branch 'master' into terencehill/menu_listbox_changes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 8167cb1bd9709ceb017b3e78c5550a030f24e0f4..35793364fafd3c60c9853065064f39a32f6bc840 100644 (file)
@@ -1,27 +1,28 @@
+#include "_all.qh"
+
 #include "announcer.qh"
-#include "autocvars.qh"
-#include "defs.qh"
 #include "hook.qh"
 #include "hud.qh"
 #include "hud_config.qh"
-#include "main.qh"
 #include "mapvoting.qh"
-#include "miscfunctions.qh"
 #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"
-#include "../dpdefs/csprogsdefs.qh"
+
 #include "../warpzonelib/client.qh"
 #include "../warpzonelib/common.qh"
 #include "../warpzonelib/mathlib.qh"
@@ -1053,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)
        {