]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
strafehud: optimize by returning immediately in draw function if alpha or width is...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Wed, 1 Jul 2020 02:32:36 +0000 (04:32 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Wed, 1 Jul 2020 02:32:36 +0000 (04:32 +0200)
qcsrc/client/hud/panel/strafehud.qc

index cb9472061724b3231c5dce89ef94725ea674c3ae..bd41105c96a05784e4a0b895c839bad766af545e 100644 (file)
@@ -618,6 +618,8 @@ void HUD_Panel_DrawStrafeHUD(float offset, float width, vector color, float alph
     vector size = panel_size;
     vector mirror_size = panel_size;
 
+    if(alpha <= 0 || width <= 0) return;
+
     if(offset < 0)
     {
         mirror_width = min(fabs(offset), width);