]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove unnecessary checks...
authorterencehill <piuntn@gmail.com>
Sun, 15 Aug 2010 22:04:51 +0000 (00:04 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 15 Aug 2010 22:04:51 +0000 (00:04 +0200)
Now that match_pattern on the engine works well on *.* patterns too, for now on we can trust search_begin.

qcsrc/client/waypointsprites.qc

index d7b9ee9d01960829aa3992dcebec4eb6bb7e84c8..a001732da2553a9411b4fdf4e09793dfe7d2ba7f 100644 (file)
@@ -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));