From: terencehill Date: Sun, 15 Aug 2010 22:04:51 +0000 (+0200) Subject: Remove unnecessary checks... X-Git-Tag: xonotic-v0.1.0preview~341^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=60c268b784a55b10f2bbaeea1e00e5a6c9649244;p=xonotic%2Fxonotic-data.pk3dir.git Remove unnecessary checks... Now that match_pattern on the engine works well on *.* patterns too, for now on we can trust search_begin. --- diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc index d7b9ee9d0..a001732da 100644 --- a/qcsrc/client/waypointsprites.qc +++ b/qcsrc/client/waypointsprites.qc @@ -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));