From 37b793f7b1da9a3ea5aa86ae422342f596f609e4 Mon Sep 17 00:00:00 2001 From: Severin Meyer Date: Fri, 31 Jul 2015 22:05:47 +0200 Subject: [PATCH] Fix the HUD panels to retain the teamcolor when entering a vehicle, credit to terencehill --- qcsrc/client/view.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 2.39.2