]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a check for r_drawviewmodel
authorterencehill <piuntn@gmail.com>
Sun, 6 Mar 2016 10:10:59 +0000 (11:10 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 6 Mar 2016 10:10:59 +0000 (11:10 +0100)
qcsrc/client/autocvars.qh
qcsrc/client/view.qc

index 49cafb896a18fcc122d751fdcda6180c657ff802..23d4e2c2acf62cf164d690e2de4cb3291b39fc90 100644 (file)
@@ -370,6 +370,7 @@ float autocvar_hud_shownames_offset;
 string autocvar_hud_skin;
 float autocvar_menu_mouse_speed;
 string autocvar_menu_skin;
+float autocvar_r_drawviewmodel;
 int autocvar_r_fakelight;
 int autocvar_r_fullbright;
 float autocvar_r_letterbox;
index a13fb2d8a0e55627b8c593dcc3757351e4400493..f2c0204e586967099b4d92468a1641ca2a3ae1a6 100644 (file)
@@ -278,7 +278,7 @@ void viewmodel_animate(entity this)
 
 void viewmodel_draw(entity this)
 {
-       if(!activeweapon)
+       if(!activeweapon || !autocvar_r_drawviewmodel)
                return;
        int mask = (intermission || (STAT(HEALTH) <= 0) || autocvar_chase_active) ? 0 : MASK_NORMAL;
        float a = this.alpha;