From: Mario Date: Sat, 8 Sep 2018 10:14:34 +0000 (+1000) Subject: Only show the health bar on turrets (no names) by default X-Git-Tag: xonotic-v0.8.5~1894 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=29e472c4f3bf1c99a58aed146f25d8a9df028d07 Only show the health bar on turrets (no names) by default --- diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh index 9bfa4862b..e2190b66a 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh @@ -52,6 +52,7 @@ int autocvar_g_waypointsprite_spam; float autocvar_g_waypointsprite_timealphaexponent; bool autocvar_g_waypointsprite_turrets = true; float autocvar_g_waypointsprite_turrets_maxdist = 5000; +bool autocvar_g_waypointsprite_turrets_text = false; bool autocvar_g_waypointsprite_uppercase; bool autocvar_g_waypointsprite_text; float autocvar_g_waypointsprite_iconsize = 32; diff --git a/qcsrc/common/turrets/cl_turrets.qc b/qcsrc/common/turrets/cl_turrets.qc index ac68003a6..6cdda5103 100644 --- a/qcsrc/common/turrets/cl_turrets.qc +++ b/qcsrc/common/turrets/cl_turrets.qc @@ -176,7 +176,10 @@ void turret_draw2d(entity this) } o = drawspritearrow(o, M_PI, rgb, a, SPRITE_ARROW_SCALE * t); - o = drawsprite_TextOrIcon(true, o, M_PI, (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t, rgb, a, waypointsprite_fontsize * '1 1 0', txt); + if(autocvar_g_waypointsprite_turrets_text) + { + o = drawsprite_TextOrIcon(true, o, M_PI, (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t, rgb, a, waypointsprite_fontsize * '1 1 0', txt); + } drawhealthbar( o, 0,