X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fwaypoints%2Fwaypointsprites.qc;h=9e20392236ea32ccb73948c1a5707d93c304f1df;hb=7e474d576080259e21690de30778b17029b5c0f2;hp=bdedf295d8b7e31a967b0b9b1f4a51248618d589;hpb=b834eab77489d98d5d722d67c8a96cf6c3549436;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index bdedf295d..9e2039223 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -259,9 +259,9 @@ string spritelookuptext(entity this, string s) } // need to loop, as our netname could be one of three - FOREACH(Waypoints, it.netname == s, LAMBDA( + FOREACH(Waypoints, it.netname == s, { return it.m_name; - )); + }); return s; } @@ -460,7 +460,7 @@ vector fixrgbexcess(vector rgb) void Draw_WaypointSprite(entity this) { if (this.lifetime > 0) - this.alpha = pow(bound(0, (this.fadetime - time) / this.lifetime, 1), waypointsprite_timealphaexponent); + this.alpha = (bound(0, (this.fadetime - time) / this.lifetime, 1) ** waypointsprite_timealphaexponent); else this.alpha = 1; @@ -522,9 +522,9 @@ void Draw_WaypointSprite(entity this) float a = this.alpha * autocvar_hud_panel_fg_alpha; if (this.maxdistance > waypointsprite_normdistance) - a *= pow(bound(0, (this.maxdistance - dist) / (this.maxdistance - waypointsprite_normdistance), 1), waypointsprite_distancealphaexponent); + a *= (bound(0, (this.maxdistance - dist) / (this.maxdistance - waypointsprite_normdistance), 1) ** waypointsprite_distancealphaexponent); else if (this.maxdistance > 0) - a *= pow(bound(0, (waypointsprite_fadedistance - dist) / (waypointsprite_fadedistance - waypointsprite_normdistance), 1), waypointsprite_distancealphaexponent) * (1 - waypointsprite_minalpha) + waypointsprite_minalpha; + a *= (bound(0, (waypointsprite_fadedistance - dist) / (waypointsprite_fadedistance - waypointsprite_normdistance), 1) ** waypointsprite_distancealphaexponent) * (1 - waypointsprite_minalpha) + waypointsprite_minalpha; vector rgb = spritelookupcolor(this, spriteimage, this.teamradar_color); if (rgb == '0 0 0') @@ -611,7 +611,7 @@ void Draw_WaypointSprite(entity this) (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o.x, (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)) - o.y); - float crosshairdistance = sqrt( pow(o.x - vid_conwidth/2, 2) + pow(o.y - vid_conheight/2, 2) ); + float crosshairdistance = sqrt( ((o.x - vid_conwidth/2) ** 2) + ((o.y - vid_conheight/2) ** 2) ); t = waypointsprite_scale; a *= waypointsprite_alpha;