From: Severin Meyer Date: Fri, 31 Jul 2015 20:05:47 +0000 (+0200) Subject: Fix the HUD panels to retain the teamcolor when entering a vehicle, credit to terencehill X-Git-Tag: xonotic-v0.8.1~31^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=37b793f7b1da9a3ea5aa86ae422342f596f609e4;p=xonotic%2Fxonotic-data.pk3dir.git Fix the HUD panels to retain the teamcolor when entering a vehicle, credit to terencehill --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index d3bcf9244..656ab7831 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1054,7 +1054,10 @@ void CSQC_UpdateView(float w, float h) CSQCPlayer_SetCamera(); - myteam = GetPlayerColor(player_localentnum - 1); + if(player_localentnum <= maxclients) // is it a client? + myteam = GetPlayerColor(player_localentnum - 1); + else // then player_localentnum is the vehicle I'm driving + myteam = GetPlayerColor(player_localnum); if(myteam != prev_myteam) {