X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fview.qc;h=35793364fafd3c60c9853065064f39a32f6bc840;hb=99c1b6ca80a69e112d410ee493d62f757b2c6df8;hp=3ffb4066c5080c2850743d747af51bf07a7aed70;hpb=e090603a32c8cba598f2c54e355cdb5b32b0d986;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 3ffb4066c..35793364f 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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" @@ -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) {