From 14a81a82dd6fa3dca94c46e4e235fa9d00631072 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sat, 15 Jul 2023 22:11:29 +1000 Subject: [PATCH] Update dpdefs/upstream --- qcsrc/dpdefs/upstream/csprogsdefs.qc | 2 +- qcsrc/dpdefs/upstream/dpextensions.qc | 13 ++++++++++++- qcsrc/dpdefs/upstream/menudefs.qc | 2 +- qcsrc/dpdefs/upstream/progsdefs.qc | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/qcsrc/dpdefs/upstream/csprogsdefs.qc b/qcsrc/dpdefs/upstream/csprogsdefs.qc index f607125b4..3f53fd3fd 100644 --- a/qcsrc/dpdefs/upstream/csprogsdefs.qc +++ b/qcsrc/dpdefs/upstream/csprogsdefs.qc @@ -336,7 +336,7 @@ void(entity e, string m) setmodel = #3; void(entity e, vector min, vector max) setsize = #4; void() break_to_debugger = #6; -float() random = #7; +float() random = #7; // Returns a random number > 0 and < 1 void(entity e, float chan, string samp, float volume, float atten, ...) sound = #8; vector(vector v) normalize = #9; void(string e) error = #10; diff --git a/qcsrc/dpdefs/upstream/dpextensions.qc b/qcsrc/dpdefs/upstream/dpextensions.qc index 57e100602..4dc5679b8 100644 --- a/qcsrc/dpdefs/upstream/dpextensions.qc +++ b/qcsrc/dpdefs/upstream/dpextensions.qc @@ -2644,7 +2644,6 @@ void(string cmdname) registercommand = #352; //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 @@ -2654,5 +2653,17 @@ 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 +//DP_QC_NUDGEOUTOFSOLID +//idea: LadyHavoc, bones_was_here +//darkplaces implementation: LadyHavoc, bones_was_here +//builtin definitions: +float(entity ent) nudgeoutofsolid = #567; +//cvar definitions: +//sv_gameplayfix_nudgeoutofsolid_separation +//description: +//Attempts to move a stuck entity out of solid brushes, returning 1 if successful, 0 if it remains stuck, -1 if it wasn't stuck. +//Note: makes only one tracebox call if the entity isn't stuck, so don't call tracebox just to see if you should call nudgeoutofsolid. + + // 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 7282f4cdb..1278dd710 100644 --- a/qcsrc/dpdefs/upstream/menudefs.qc +++ b/qcsrc/dpdefs/upstream/menudefs.qc @@ -179,7 +179,7 @@ float vlen(vector v) = #9; float vectoyaw(vector v) = #10; vector vectoangles(vector v) = #11; -float random(void) = #12; +float random(void) = #12; // Returns a random number > 0 and < 1 void cmd(string command, ...) = #13; diff --git a/qcsrc/dpdefs/upstream/progsdefs.qc b/qcsrc/dpdefs/upstream/progsdefs.qc index e0a9acd16..937f0a72c 100644 --- a/qcsrc/dpdefs/upstream/progsdefs.qc +++ b/qcsrc/dpdefs/upstream/progsdefs.qc @@ -403,7 +403,7 @@ void(entity e, string m) setmodel = #3; // set movetype and solid first void(entity e, vector min, vector max) setsize = #4; // #5 was removed void() break_to_debugger = #6; -float() random = #7; // returns 0 - 1 +float() random = #7; // Returns a random number > 0 and < 1 void(entity e, float chan, string samp, float volume, ...) sound = #8; vector(vector v) normalize = #9; void(string e, ...) error = #10; -- 2.39.2