]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
viewmodels: fix vehicles
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 18 Dec 2015 00:58:00 +0000 (11:58 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 18 Dec 2015 00:58:00 +0000 (11:58 +1100)
qcsrc/client/view.qc

index 8602ef26a24eb179ebf0aee8599393f3e25dff67..a5425cb3c9b13ab5d1cfb0b51648272f4f2ee3e3 100644 (file)
@@ -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;