]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/waypointsprites.qc
fix it ;)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / waypointsprites.qc
index db0fdb83fd81a3dd46293211d9eca60df94157ad..a001732da2553a9411b4fdf4e09793dfe7d2ba7f 100644 (file)
@@ -166,7 +166,7 @@ void Draw_WaypointSprite()
        dist = vlen(self.origin - view_origin);
        
        float a;
-       a = self.alpha * hud_fg_alpha;
+       a = self.alpha * autocvar_hud_panel_fg_alpha;
 
        if(self.maxdistance > waypointsprite_normdistance)
                a *= pow(bound(0, (self.maxdistance - dist) / (self.maxdistance - waypointsprite_normdistance), 1), waypointsprite_distancealphaexponent);
@@ -436,11 +436,7 @@ void WaypointSprite_Load()
                for(i = 0; i < n; ++i)
                {
                        s = search_getfilename(dh, i);
-                       if(substring(s, 0, 15) != "models/sprites/")
-                               continue;
-                       if(substring(s, strlen(s) - 4, 4) != ".tga")
-                               continue;
-                       s = substring(s, 15, strlen(s) - 19);
+                       s = substring(s, 15, strlen(s) - 15 - 4); // strip models/sprites/ and .tga
 
                        o = strstrofs(s, "_frame", 0);
                        sname = strcat("/spriteframes/", substring(s, 0, o));