From: terencehill Date: Sun, 6 Mar 2016 10:10:59 +0000 (+0100) Subject: Add a check for r_drawviewmodel X-Git-Tag: xonotic-v0.8.2~882^2~16 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f6c24037989dd1b913f25cc0fd79c589ba2af1f9;p=xonotic%2Fxonotic-data.pk3dir.git Add a check for r_drawviewmodel --- 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;