]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix some duplicate and missing builtin entries in csprogsdefs.qc
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 16 Jul 2020 14:45:08 +0000 (14:45 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 16 Jul 2020 14:45:08 +0000 (14:45 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12829 d7cf8633-e32d-0410-b094-e92efae38249

dpdefs/csprogsdefs.qc

index ce31fad481e36f99187d7b7edb2dc28fb440bc7f..457bd7cd80706508cb007507dc151a27d323b64a 100644 (file)
@@ -421,6 +421,7 @@ float( float b, ... ) max = #95;
 float(float minimum, float val, float maximum) bound = #96;
 float(float f, float f) pow = #97;
 entity(entity start, .float fld, float match) findfloat = #98;
+entity(entity start, .entity fld, entity match) findentity = #98;
 float(string s) checkextension = #99;
 // FrikaC and Telejano range #100-#199
 
@@ -943,13 +944,13 @@ vector    drawgetimagesize(string pic) = #318;
 #define SPA_TEXCOORDS0 4
 #define SPA_LIGHTMAP0_TEXCOORDS 5
 #define SPA_LIGHTMAP_COLOR 6
-float (entity e, float s)                                              getsurfacenumpoints = #434;
-vector (entity e, float s, float n)                                    getsurfacepoint = #435;
-vector (entity e, float s)                                             getsurfacenormal = #436;
-string (entity e, float s)                                             getsurfacetexture = #437;
-float (entity e, vector p)                                             getsurfacenearpoint = #438;
-vector (entity e, float s, vector p)                                   getsurfaceclippedpoint = #439;
-vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
+// float (entity e, float s)                                           getsurfacenumpoints = #434;
+// vector (entity e, float s, float n)                                 getsurfacepoint = #435;
+// vector (entity e, float s)                                          getsurfacenormal = #436;
+// string (entity e, float s)                                          getsurfacetexture = #437;
+// float (entity e, vector p)                                          getsurfacenearpoint = #438;
+// vector (entity e, float s, vector p)                                        getsurfaceclippedpoint = #439;
+// vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
 float(entity e, float s) getsurfacenumtriangles = #628;
 vector(entity e, float s, float n) getsurfacetriangle = #629;
 
@@ -961,11 +962,13 @@ float DEG2RAD = 0.01745329251994329576923690768488612713442871888541725456097191
 float RAD2DEG = 57.2957795130823208767981548141051703324054724665643215491602438612;
 float PI      = 3.1415926535897932384626433832795028841971693993751058209749445923;
 //builtin definitions:
+/* -Wdouble-declaration
 float(float s) asin = #471; // returns angle in radians for a given sin() value, the result is in the range -PI*0.5 to PI*0.5
 float(float c) acos = #472; // returns angle in radians for a given cos() value, the result is in the range 0 to PI
 float(float t) atan = #473; // returns angle in radians for a given tan() value, the result is in the range -PI*0.5 to PI*0.5
 float(float c, float s) atan2 = #474; // returns angle in radians for a given cos() and sin() value pair, the result is in the range -PI to PI (this is identical to vectoyaw except it returns radians rather than degrees)
 float(float a) tan = #475; // returns tangent value (which is simply sin(a)/cos(a)) for the given angle in radians, the result is in the range -infinity to +infinity
+*/
 //description:
 //useful math functions for analyzing vectors, note that these all use angles in radians (just like the cos/sin functions) not degrees unlike makevectors/vectoyaw/vectoangles, so be sure to do the appropriate conversions (multiply by DEG2RAD or RAD2DEG as needed).
 //note: atan2 can take unnormalized vectors (just like vectoyaw), and the function was included only for completeness (more often you want vectoyaw or vectoangles), atan2(v_x,v_y) * RAD2DEG gives the same result as vectoyaw(v)