]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - dpdefs/dpextensions.qc
progs: Implement new extension DP_QC_FS_SEARCH_PACKFILE
[xonotic/darkplaces.git] / dpdefs / dpextensions.qc
index 05812846742975bf25bdcc7c6d22e15c8e9fc109..43dd56cb6a929736f055c4ed000f850d72846f6e 100644 (file)
@@ -2623,3 +2623,12 @@ float MOVETYPE_USER_LAST = 191;
 string __fullspawndata;
 //description:
 // http://icculus.org/finger/marco?date=2019-01-25&time=05-38-02
+
+//DP_QC_FS_SEARCH_PACKFILE
+//idea: Mario
+//darkplaces implementation: Mario
+//builtin definitions:
+float(string pattern, float caseinsensitive, float quiet, string packfile) search_packfile_begin = #444;
+//description:
+//extension to search_begin (DP_QC_FS_SEARCH), performs a filename search with the specified pattern (for example "maps/*.bsp") and stores the results in a search slot (minimum of 128 supported by any engine with this extension), the other functions take this returned search slot number, be sure to search_free when done (they are also freed on progs reload).
+//only searches for files within the specified packfile, which is expected to match the results of whichpack().