From d9425430ee5bb7e867fdb4ad2d99a112f6e14aa2 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 19 May 2023 20:19:33 +1000 Subject: [PATCH] Update dpdefs/upstream --- qcsrc/common/mapinfo.qc | 3 --- qcsrc/dpdefs/upstream/csprogsdefs.qc | 13 ++++++++++++ qcsrc/dpdefs/upstream/dpextensions.qc | 30 ++++++++++++++++++++++++--- qcsrc/dpdefs/upstream/menudefs.qc | 10 +++++++++ qcsrc/dpdefs/upstream/progsdefs.qc | 2 +- qcsrc/menu/xonotic/util.qc | 1 - 6 files changed, 51 insertions(+), 8 deletions(-) diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 04c74d498..82a7e7584 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -935,9 +935,6 @@ bool _MapInfo_ParseArena(string arena_filename, int fh, string pFilename, Gamety return false; } -#if defined(CSQC) -string(string filename) whichpack = #503; -#endif string _MapInfo_CheckArenaFile(string pFilename, string pMapname) { // returns the file name if valid, otherwise returns "" diff --git a/qcsrc/dpdefs/upstream/csprogsdefs.qc b/qcsrc/dpdefs/upstream/csprogsdefs.qc index 457bd7cd8..f607125b4 100644 --- a/qcsrc/dpdefs/upstream/csprogsdefs.qc +++ b/qcsrc/dpdefs/upstream/csprogsdefs.qc @@ -435,6 +435,7 @@ string(string s, float start, float length) substring = #116; vector(string) stov = #117; string(string s) strzone = #118; void(string s) strunzone = #119; +void(string s, float chan, float vol) localsound = #177; // FTEQW range #200-#299 @@ -1182,6 +1183,16 @@ float CVAR_TYPEFLAG_READONLY = 32; //When caseinsensitive is set, the CRC is calculated of the lower cased string. float(float caseinsensitive, string s, ...) crc16 = #494; +//DP_QC_WHICHPACK +//idea: divVerent +//darkplaces implementation: divVerent +//builtin definitions: +string(string filename) whichpack = #503; +//description: +//for files in a pak/pk3/whatever, returns the pack's file name in FRIK_FILE name space. +//for physical files, returns "". +//in case of error, returns string_null. + //DP_QC_URI_ESCAPE //idea: divVerent //darkplaces implementation: divVerent @@ -1474,3 +1485,5 @@ vector gettaginfo_forward; vector gettaginfo_right; vector gettaginfo_up; float checkpvs(vector viewpos, entity viewee) = #240; +// bones_was_here: commented as QC wants to use this but we still need to support div0-stable: +//float mod(float dividend, float divisor) = #245; diff --git a/qcsrc/dpdefs/upstream/dpextensions.qc b/qcsrc/dpdefs/upstream/dpextensions.qc index 1aeecfafd..57e100602 100644 --- a/qcsrc/dpdefs/upstream/dpextensions.qc +++ b/qcsrc/dpdefs/upstream/dpextensions.qc @@ -763,10 +763,10 @@ entity(.string fld, string match) findchain = #402; //idea: divVerent //darkplaces implementation: divVerent //builtin definitions: -entity(.string fld, float match, .entity tofield) findradius_tofield = #22; +entity(vector org, float rad, .entity tofield) findradius_tofield = #22; entity(.string fld, string match, .entity tofield) findchain_tofield = #402; -entity(.string fld, float match, .entity tofield) findchainflags_tofield = #450; -entity(.string fld, float match, .entity tofield) findchainfloat_tofield = #403; +entity(.float fld, float match, .entity tofield) findchainflags_tofield = #450; +entity(.float fld, float match, .entity tofield) findchainfloat_tofield = #403; //description: //similar to findchain() etc, but stores the chain into .tofield instead of .chain //actually, the .entity tofield is an optional field of the the existing findchain* functions @@ -2632,3 +2632,27 @@ float(string pattern, float caseinsensitive, float quiet, string packfile) searc //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(). + +//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: +//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. + + +//DP_QC_FINDBOX +//idea: Mario +//darkplaces implementation: bones_was_here +//builtin definitions: +entity(vector mins, vector maxs) findbox = #566; +entity(vector mins, vector maxs, .entity tofield) findbox_tofield = #566; +//description: +//Returns a chain of entities that are touching a box (a simpler findradius); supports DP_QC_FINDCHAIN_TOFIELD + +// bones_was_here: commented as QC wants to use this but we still need to support div0-stable: +//float(float dividend, float divisor) mod = #245; diff --git a/qcsrc/dpdefs/upstream/menudefs.qc b/qcsrc/dpdefs/upstream/menudefs.qc index 63d2c6388..7282f4cdb 100644 --- a/qcsrc/dpdefs/upstream/menudefs.qc +++ b/qcsrc/dpdefs/upstream/menudefs.qc @@ -477,6 +477,16 @@ string(string digest, string data, ...) digest_hex = #639; //if the given digest is not supported, string_null is returned //the digest string is matched case sensitively, use "MD4", not "md4"! +//DP_QC_WHICHPACK +//idea: divVerent +//darkplaces implementation: divVerent +//builtin definitions: +string(string filename) whichpack = #503; +//description: +//for files in a pak/pk3/whatever, returns the pack's file name in FRIK_FILE name space. +//for physical files, returns "". +//in case of error, returns string_null. + //DP_QC_URI_ESCAPE //idea: div0 //darkplaces implementation: div0 diff --git a/qcsrc/dpdefs/upstream/progsdefs.qc b/qcsrc/dpdefs/upstream/progsdefs.qc index 68f161ce2..e0a9acd16 100644 --- a/qcsrc/dpdefs/upstream/progsdefs.qc +++ b/qcsrc/dpdefs/upstream/progsdefs.qc @@ -236,7 +236,7 @@ float FL_INWATER = 16; // for enter / leave water splash float FL_MONSTER = 32; float FL_GODMODE = 64; // player cheat float FL_NOTARGET = 128; // player cheat -float FL_ITEM = 256; // extra wide size for bonus items +float FL_ITEM = 256; // extra wide size for bonus items IF sv_legacy_bbox_expand is 1 float FL_ONGROUND = 512; // standing on something float FL_PARTIALGROUND = 1024; // not all corners are valid float FL_WATERJUMP = 2048; // player jumping out of water diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 2ddfd54e1..582d037f5 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -453,7 +453,6 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data) // END OF URI SYSTEM //////////////////////////////////////////////////////// -string(string filename) whichpack = #503; void updateCheck() { if(!_Nex_ExtResponseSystem_Queried) -- 2.39.2