From f6c24037989dd1b913f25cc0fd79c589ba2af1f9 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 6 Mar 2016 11:10:59 +0100 Subject: [PATCH] Add a check for r_drawviewmodel --- qcsrc/client/autocvars.qh | 1 + qcsrc/client/view.qc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 49cafb896..23d4e2c2a 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -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; diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index a13fb2d8a..f2c0204e5 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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; -- 2.39.2