]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - dpdefs/dpextensions.qc
Reimplement the ability to override engine commands with QC commands
[xonotic/darkplaces.git] / dpdefs / dpextensions.qc
index 48045a202faf22ed1b7bdcbf811db9d113d7752e..32c5e7c5ab6a145596decc113fc96b0521ae0b7d 100644 (file)
@@ -2633,12 +2633,16 @@ float(string pattern, float caseinsensitive, float quiet, string packfile) searc
 //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().
 
-//EXT_CSQC (registercommand for SSQC)
+//EXT_CSQC (registercommand for CSQC, now also available in SVQC)
 //idea: probably Spoike
 //darkplaces implementation: Cloudwalk
 //builtin definitions:
 void(string cmdname) registercommand = #352;
+//engine-called QC prototypes:
+//float CSQC_ConsoleCommand(string command);
+//float ConsoleCmd(string command);
 //description:
-//the registercommand builtin but the server can use it
+//Adds a new console command which will take priority over a previous command of the same name (including engine commands) and in CSQC is removed when the VM shuts down. This will call CSQC_ConsoleCommand(string command) or ConsoleCmd(string command) in SVQC.  Return value should be true if QC handled the command, otherwise return false to have the engine handle it.
+
 
 float(float dividend, float divisor) mod = #245;