From: bones_was_here <bones_was_here@xonotic.au>
Date: Sat, 15 Jul 2023 12:11:29 +0000 (+1000)
Subject: Update dpdefs/upstream
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=14a81a82dd6fa3dca94c46e4e235fa9d00631072;p=xonotic%2Fxonotic-data.pk3dir.git

Update dpdefs/upstream
---

diff --git a/qcsrc/dpdefs/upstream/csprogsdefs.qc b/qcsrc/dpdefs/upstream/csprogsdefs.qc
index f607125b4c..3f53fd3fd3 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 57e1006021..4dc5679b80 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 7282f4cdbb..1278dd710a 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 e0a9acd160..937f0a72c1 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;