]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Simplify an assignment
authorterencehill <piuntn@gmail.com>
Fri, 2 Dec 2016 17:02:25 +0000 (18:02 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 2 Dec 2016 17:02:25 +0000 (18:02 +0100)
qcsrc/client/shownames.qc

index add8992aab64f6d74e5305f13fbbe7cd9318aa47..4b892304b9796fa397107351aa245bc03f5350f5 100644 (file)
@@ -78,8 +78,10 @@ void Draw_ShowNames(entity this)
                float w = o.x - vid_conwidth / 2;
                float h = o.y - vid_conheight / 2;
                if (d * d > w * w + h * h) this.pointtime = time;
                float w = o.x - vid_conwidth / 2;
                float h = o.y - vid_conheight / 2;
                if (d * d > w * w + h * h) this.pointtime = time;
-               if (this.pointtime + autocvar_hud_shownames_crosshairdistance_time <= time) overlap = true;
-               else overlap = (autocvar_hud_shownames_crosshairdistance_antioverlap ? overlap : false); // override what antioverlap says unless allowed by cvar.
+               if (this.pointtime + autocvar_hud_shownames_crosshairdistance_time <= time)
+                       overlap = true;
+               else if(!autocvar_hud_shownames_crosshairdistance_antioverlap)
+                       overlap = false;
        }
        if (!this.fadedelay) this.fadedelay = time + SHOWNAMES_FADEDELAY;
        if (this.csqcmodel_isdead)                                                                   // dead player, fade out slowly
        }
        if (!this.fadedelay) this.fadedelay = time + SHOWNAMES_FADEDELAY;
        if (this.csqcmodel_isdead)                                                                   // dead player, fade out slowly