From: TimePath Date: Fri, 18 Dec 2015 00:58:00 +0000 (+1100) Subject: viewmodels: fix vehicles X-Git-Tag: xonotic-v0.8.2~1477 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ccc5cfd2466839553ed813d3172a7e7fa7554ee7;p=xonotic%2Fxonotic-data.pk3dir.git viewmodels: fix vehicles --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 8602ef26a..a5425cb3c 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -274,6 +274,11 @@ void viewmodel_draw(entity this) { int mask = (intermission || (STAT(HEALTH) <= 0) || autocvar_chase_active) ? 0 : MASK_NORMAL; float a = this.alpha; + static bool wasinvehicle; + bool invehicle = player_localentnum > maxclients; + if (invehicle) a = -1; + else if (wasinvehicle) a = 1; + wasinvehicle = invehicle; int c = stof(getplayerkeyvalue(current_player, "colors")); vector g; Weapon wep = activeweapon;