]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Update dpdefs/upstream
authorbones_was_here <bones_was_here@xonotic.au>
Sat, 15 Jul 2023 12:11:29 +0000 (22:11 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sat, 15 Jul 2023 12:11:29 +0000 (22:11 +1000)
qcsrc/dpdefs/upstream/csprogsdefs.qc
qcsrc/dpdefs/upstream/dpextensions.qc
qcsrc/dpdefs/upstream/menudefs.qc
qcsrc/dpdefs/upstream/progsdefs.qc

index f607125b4ca0bac4404bfd6011e2078ab1cccedd..3f53fd3fd3e19c46d93228ab24d3db7ec917bdd4 100644 (file)
@@ -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;
index 57e1006021b12e9472eeaf5911f7095657e53cb1..4dc5679b801aef99ef57c83c249f610858b7a656 100644 (file)
@@ -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;
index 7282f4cdbbe4e59a609a4ecfe7fc42a37af330e4..1278dd710a8052bd77db771c258db428be8c0904 100644 (file)
@@ -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;
 
index e0a9acd160868b6df356f9309872e3930a77c0d9..937f0a72c14523c875735cafc6d1aab259458493 100644 (file)
@@ -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;