]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Convert CLVM builtins 0-311 and 521-642 to new argument style
authorCloudwalk <cloudwalk009@gmail.com>
Tue, 1 Dec 2020 15:40:10 +0000 (10:40 -0500)
committerCloudwalk <cloudwalk009@gmail.com>
Tue, 1 Dec 2020 15:45:59 +0000 (10:45 -0500)
clvm_cmds.c

index b82a365bfda973daf1f39103d752966a88abaad9..d7e70c9eb0efea6fdcabc3689ed62085909c4d48 100644 (file)
@@ -4943,51 +4943,51 @@ NULL,                                                   // #0 NULL function (not callable) (QUAKE)
 {VM_CL_setsize, 3, 3},                                 // #4 void(entity e, vector min, vector max) setsize (QUAKE)
 NULL,                                                  // #5 void(entity e, vector min, vector max) setabssize (QUAKE)
 {VM_break, 0, 0},                                              // #6 void() break (QUAKE)
-{VM_random},                                           // #7 float() random (QUAKE)
-{VM_CL_sound},                                 // #8 void(entity e, float chan, string samp, float volume, float atten[, float pitchchange[, float flags]]) sound (QUAKE)
-{VM_normalize},                                        // #9 vector(vector v) normalize (QUAKE)
-{VM_error},                                            // #10 void(string e) error (QUAKE)
-{VM_objerror},                                 // #11 void(string e) objerror (QUAKE)
-{VM_vlen},                                             // #12 float(vector v) vlen (QUAKE)
-{VM_vectoyaw},                                 // #13 float(vector v) vectoyaw (QUAKE)
-{VM_CL_spawn},                                 // #14 entity() spawn (QUAKE)
-{VM_remove},                                           // #15 void(entity e) remove (QUAKE)
-{VM_CL_traceline},                             // #16 void(vector v1, vector v2, float tryents, entity ignoreentity) traceline (QUAKE)
+{VM_random, 0, 0},                                             // #7 float() random (QUAKE)
+{VM_CL_sound, 5, 7},                                   // #8 void(entity e, float chan, string samp, float volume, float atten[, float pitchchange[, float flags]]) sound (QUAKE)
+{VM_normalize, 1, 1},                                  // #9 vector(vector v) normalize (QUAKE)
+{VM_error, 1, 1},                                              // #10 void(string e) error (QUAKE)
+{VM_objerror, 1, 1},                                   // #11 void(string e) objerror (QUAKE)
+{VM_vlen, 1, 1},                                               // #12 float(vector v) vlen (QUAKE)
+{VM_vectoyaw, 1, 1},                                   // #13 float(vector v) vectoyaw (QUAKE)
+{VM_CL_spawn, 0, 0},                                   // #14 entity() spawn (QUAKE)
+{VM_remove, 1, 1},                                             // #15 void(entity e) remove (QUAKE)
+{VM_CL_traceline, 4, 4},                               // #16 void(vector v1, vector v2, float tryents, entity ignoreentity) traceline (QUAKE)
 NULL,                                                  // #17 entity() checkclient (QUAKE)
-{VM_find},                                             // #18 entity(entity start, .string fld, string match) find (QUAKE)
-{VM_precache_sound},                           // #19 void(string s) precache_sound (QUAKE)
-{VM_CL_precache_model},                        // #20 void(string s) precache_model (QUAKE)
+{VM_find, 3, 3},                                               // #18 entity(entity start, .string fld, string match) find (QUAKE)
+{VM_precache_sound, 1, 1},                             // #19 void(string s) precache_sound (QUAKE)
+{VM_CL_precache_model, 1, 1},                  // #20 void(string s) precache_model (QUAKE)
 NULL,                                                  // #21 void(entity client, string s, ...) stuffcmd (QUAKE)
-{VM_CL_findradius},                            // #22 entity(vector org, float rad) findradius (QUAKE)
+{VM_CL_findradius, 2, 3},                              // #22 entity(vector org, float rad) findradius (QUAKE)
 NULL,                                                  // #23 void(string s, ...) bprint (QUAKE)
 NULL,                                                  // #24 void(entity client, string s, ...) sprint (QUAKE)
-{VM_dprint},                                           // #25 void(string s, ...) dprint (QUAKE)
-{VM_ftos},                                             // #26 string(float f) ftos (QUAKE)
-{VM_vtos},                                             // #27 string(vector v) vtos (QUAKE)
-{VM_coredump},                                 // #28 void() coredump (QUAKE)
-{VM_traceon},                                          // #29 void() traceon (QUAKE)
-{VM_traceoff},                                 // #30 void() traceoff (QUAKE)
-{VM_eprint},                                           // #31 void(entity e) eprint (QUAKE)
-{VM_CL_walkmove},                                      // #32 float(float yaw, float dist[, float settrace]) walkmove (QUAKE)
+{VM_dprint, 1, 8},                                             // #25 void(string s, ...) dprint (QUAKE)
+{VM_ftos, 1, 1},                                               // #26 string(float f) ftos (QUAKE)
+{VM_vtos, 1, 1},                                               // #27 string(vector v) vtos (QUAKE)
+{VM_coredump, 0, 0},                                   // #28 void() coredump (QUAKE)
+{VM_traceon, 0, 0},                                            // #29 void() traceon (QUAKE)
+{VM_traceoff, 0, 0},                                   // #30 void() traceoff (QUAKE)
+{VM_eprint, 1, 1},                                             // #31 void(entity e) eprint (QUAKE)
+{VM_CL_walkmove, 2, 3},                                        // #32 float(float yaw, float dist[, float settrace]) walkmove (QUAKE)
 NULL,                                                  // #33 (QUAKE)
-{VM_CL_droptofloor},                           // #34 float() droptofloor (QUAKE)
-{VM_CL_lightstyle},                            // #35 void(float style, string value) lightstyle (QUAKE)
-{VM_rint},                                             // #36 float(float v) rint (QUAKE)
-{VM_floor},                                            // #37 float(float v) floor (QUAKE)
-{VM_ceil},                                             // #38 float(float v) ceil (QUAKE)
+{VM_CL_droptofloor, 0, 2},                             // #34 float() droptofloor (QUAKE)
+{VM_CL_lightstyle, 2, 2},                              // #35 void(float style, string value) lightstyle (QUAKE)
+{VM_rint, 1, 1},                                               // #36 float(float v) rint (QUAKE)
+{VM_floor, 1, 1},                                              // #37 float(float v) floor (QUAKE)
+{VM_ceil, 1, 1},                                               // #38 float(float v) ceil (QUAKE)
 NULL,                                                  // #39 (QUAKE)
-{VM_CL_checkbottom},                           // #40 float(entity e) checkbottom (QUAKE)
-{VM_CL_pointcontents},                 // #41 float(vector v) pointcontents (QUAKE)
+{VM_CL_checkbottom, 1, 1},                             // #40 float(entity e) checkbottom (QUAKE)
+{VM_CL_pointcontents, 1, 1},                   // #41 float(vector v) pointcontents (QUAKE)
 NULL,                                                  // #42 (QUAKE)
-{VM_fabs},                                             // #43 float(float f) fabs (QUAKE)
+{VM_fabs, 1, 1},                                               // #43 float(float f) fabs (QUAKE)
 NULL,                                                  // #44 vector(entity e, float speed) aim (QUAKE)
-{VM_cvar},                                             // #45 float(string s) cvar (QUAKE)
-{VM_localcmd_client},                          // #46 void(string s) localcmd (QUAKE)
-{VM_nextent},                                          // #47 entity(entity e) nextent (QUAKE)
-{VM_CL_particle},                                      // #48 void(vector o, vector d, float color, float count) particle (QUAKE)
-{VM_changeyaw},                                        // #49 void() ChangeYaw (QUAKE)
+{VM_cvar, 1, 8},                                               // #45 float(string s) cvar (QUAKE)
+{VM_localcmd_client, 1, 8},                            // #46 void(string s) localcmd (QUAKE)
+{VM_nextent, 1, 1},                                            // #47 entity(entity e) nextent (QUAKE)
+{VM_CL_particle, 4, 4},                                        // #48 void(vector o, vector d, float color, float count) particle (QUAKE)
+{VM_changeyaw, 0, 0},                                  // #49 void() ChangeYaw (QUAKE)
 NULL,                                                  // #50 (QUAKE)
-{VM_vectoangles},                                      // #51 vector(vector v) vectoangles (QUAKE)
+{VM_vectoangles, 1, 2},                                        // #51 vector(vector v) vectoangles (QUAKE)
 NULL,                                                  // #52 void(float to, float f) WriteByte (QUAKE)
 NULL,                                                  // #53 void(float to, float f) WriteChar (QUAKE)
 NULL,                                                  // #54 void(float to, float f) WriteShort (QUAKE)
@@ -4996,28 +4996,28 @@ NULL,                                                   // #56 void(float to, float f) WriteCoord (QUAKE)
 NULL,                                                  // #57 void(float to, float f) WriteAngle (QUAKE)
 NULL,                                                  // #58 void(float to, string s) WriteString (QUAKE)
 NULL,                                                  // #59 (QUAKE)
-{VM_sin},                                                      // #60 float(float f) sin (DP_QC_SINCOSSQRTPOW)
-{VM_cos},                                                      // #61 float(float f) cos (DP_QC_SINCOSSQRTPOW)
-{VM_sqrt},                                             // #62 float(float f) sqrt (DP_QC_SINCOSSQRTPOW)
-{VM_changepitch},                                      // #63 void(entity ent) changepitch (DP_QC_CHANGEPITCH)
-{VM_CL_tracetoss},                             // #64 void(entity e, entity ignore) tracetoss (DP_QC_TRACETOSS)
-{VM_etos},                                             // #65 string(entity ent) etos (DP_QC_ETOS)
+{VM_sin, 1, 1},                                                        // #60 float(float f) sin (DP_QC_SINCOSSQRTPOW)
+{VM_cos, 1, 1},                                                        // #61 float(float f) cos (DP_QC_SINCOSSQRTPOW)
+{VM_sqrt, 1, 1},                                               // #62 float(float f) sqrt (DP_QC_SINCOSSQRTPOW)
+{VM_changepitch, 1, 1},                                        // #63 void(entity ent) changepitch (DP_QC_CHANGEPITCH)
+{VM_CL_tracetoss, 2, 2},                               // #64 void(entity e, entity ignore) tracetoss (DP_QC_TRACETOSS)
+{VM_etos, 1, 1},                                               // #65 string(entity ent) etos (DP_QC_ETOS)
 NULL,                                                  // #66 (QUAKE)
 NULL,                                                  // #67 void(float step) movetogoal (QUAKE)
-{VM_precache_file},                            // #68 string(string s) precache_file (QUAKE)
-{VM_CL_makestatic},                            // #69 void(entity e) makestatic (QUAKE)
+{VM_precache_file, 1, 1},                              // #68 string(string s) precache_file (QUAKE)
+{VM_CL_makestatic, 1, 1},                              // #69 void(entity e) makestatic (QUAKE)
 NULL,                                                  // #70 void(string s) changelevel (QUAKE)
 NULL,                                                  // #71 (QUAKE)
-{VM_cvar_set},                                 // #72 void(string var, string val) cvar_set (QUAKE)
+{VM_cvar_set, 2, 8},                                   // #72 void(string var, string val) cvar_set (QUAKE)
 NULL,                                                  // #73 void(entity client, strings) centerprint (QUAKE)
-{VM_CL_ambientsound},                          // #74 void(vector pos, string samp, float vol, float atten) ambientsound (QUAKE)
-{VM_CL_precache_model},                        // #75 string(string s) precache_model2 (QUAKE)
-{VM_precache_sound},                           // #76 string(string s) precache_sound2 (QUAKE)
-{VM_precache_file},                            // #77 string(string s) precache_file2 (QUAKE)
+{VM_CL_ambientsound, 4, 4},                            // #74 void(vector pos, string samp, float vol, float atten) ambientsound (QUAKE)
+{VM_CL_precache_model, 1, 1},                  // #75 string(string s) precache_model2 (QUAKE)
+{VM_precache_sound, 1, 1},                             // #76 string(string s) precache_sound2 (QUAKE)
+{VM_precache_file, 1, 1},                              // #77 string(string s) precache_file2 (QUAKE)
 NULL,                                                  // #78 void(entity e) setspawnparms (QUAKE)
 NULL,                                                  // #79 void(entity killer, entity killee) logfrag (QUAKEWORLD)
 NULL,                                                  // #80 string(entity e, string keyname) infokey (QUAKEWORLD)
-{VM_stof},                                             // #81 float(string s) stof (FRIK_FILE)
+{VM_stof, 1, 8},                                               // #81 float(string s) stof (FRIK_FILE)
 NULL,                                                  // #82 void(vector where, float set) multicast (QUAKEWORLD)
 NULL,                                                  // #83 (QUAKE)
 NULL,                                                  // #84 (QUAKE)
@@ -5026,16 +5026,16 @@ NULL,                                                   // #86 (QUAKE)
 NULL,                                                  // #87 (QUAKE)
 NULL,                                                  // #88 (QUAKE)
 NULL,                                                  // #89 (QUAKE)
-{VM_CL_tracebox},                                      // #90 void(vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox (DP_QC_TRACEBOX)
-{VM_randomvec},                                        // #91 vector() randomvec (DP_QC_RANDOMVEC)
-{VM_CL_getlight},                                      // #92 vector(vector org) getlight (DP_QC_GETLIGHT)
-{VM_registercvar},                             // #93 float(string name, string value) registercvar (DP_REGISTERCVAR)
-{VM_min},                                                      // #94 float(float a, floats) min (DP_QC_MINMAXBOUND)
-{VM_max},                                                      // #95 float(float a, floats) max (DP_QC_MINMAXBOUND)
-{VM_bound},                                            // #96 float(float minimum, float val, float maximum) bound (DP_QC_MINMAXBOUND)
-{VM_pow},                                                      // #97 float(float f, float f) pow (DP_QC_SINCOSSQRTPOW)
-{VM_findfloat},                                        // #98 entity(entity start, .float fld, float match) findfloat (DP_QC_FINDFLOAT)
-{VM_checkextension},                           // #99 float(string s) checkextension (the basis of the extension system)
+{VM_CL_tracebox, 6, 8},                                        // #90 void(vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox (DP_QC_TRACEBOX)
+{VM_randomvec, 0, 0},                                  // #91 vector() randomvec (DP_QC_RANDOMVEC)
+{VM_CL_getlight, 1, 3},                                        // #92 vector(vector org) getlight (DP_QC_GETLIGHT)
+{VM_registercvar, 2, 3},                               // #93 float(string name, string value) registercvar (DP_REGISTERCVAR)
+{VM_min, 2, 8},                                                        // #94 float(float a, floats) min (DP_QC_MINMAXBOUND)
+{VM_max, 2, 8},                                                        // #95 float(float a, floats) max (DP_QC_MINMAXBOUND)
+{VM_bound, 3, 3},                                              // #96 float(float minimum, float val, float maximum) bound (DP_QC_MINMAXBOUND)
+{VM_pow, 2, 2},                                                        // #97 float(float f, float f) pow (DP_QC_SINCOSSQRTPOW)
+{VM_findfloat, 3, 3},                                  // #98 entity(entity start, .float fld, float match) findfloat (DP_QC_FINDFLOAT)
+{VM_checkextension, 1, 1},                             // #99 float(string s) checkextension (the basis of the extension system)
 // FrikaC and Telejano range #100-#199
 NULL,                                                  // #100
 NULL,                                                  // #101
@@ -5047,16 +5047,16 @@ NULL,                                                   // #106
 NULL,                                                  // #107
 NULL,                                                  // #108
 NULL,                                                  // #109
-{VM_fopen},                                            // #110 float(string filename, float mode) fopen (FRIK_FILE)
-{VM_fclose},                                           // #111 void(float fhandle) fclose (FRIK_FILE)
-{VM_fgets},                                            // #112 string(float fhandle) fgets (FRIK_FILE)
-{VM_fputs},                                            // #113 void(float fhandle, string s) fputs (FRIK_FILE)
-{VM_strlen},                                           // #114 float(string s) strlen (FRIK_FILE)
-{VM_strcat},                                           // #115 string(string s1, string s2, ...) strcat (FRIK_FILE)
-{VM_substring},                                        // #116 string(string s, float start, float length) substring (FRIK_FILE)
-{VM_stov},                                             // #117 vector(string) stov (FRIK_FILE)
-{VM_strzone},                                          // #118 string(string s) strzone (FRIK_FILE)
-{VM_strunzone},                                        // #119 void(string s) strunzone (FRIK_FILE)
+{VM_fopen, 2, 2},                                              // #110 float(string filename, float mode) fopen (FRIK_FILE)
+{VM_fclose, 1, 1},                                             // #111 void(float fhandle) fclose (FRIK_FILE)
+{VM_fgets, 1, 1},                                              // #112 string(float fhandle) fgets (FRIK_FILE)
+{VM_fputs, 2, 2},                                              // #113 void(float fhandle, string s) fputs (FRIK_FILE)
+{VM_strlen, 1, 1},                                             // #114 float(string s) strlen (FRIK_FILE)
+{VM_strcat, 1, 8},                                             // #115 string(string s1, string s2, ...) strcat (FRIK_FILE)
+{VM_substring, 3, 3},                                  // #116 string(string s, float start, float length) substring (FRIK_FILE)
+{VM_stov, 1, 1},                                               // #117 vector(string) stov (FRIK_FILE)
+{VM_strzone, 1, 1},                                            // #118 string(string s) strzone (FRIK_FILE)
+{VM_strunzone, 1, 1},                                  // #119 void(string s) strunzone (FRIK_FILE)
 NULL,                                                  // #120
 NULL,                                                  // #121
 NULL,                                                  // #122
@@ -5156,19 +5156,19 @@ NULL,                                                   // #214
 NULL,                                                  // #215
 NULL,                                                  // #216
 NULL,                                                  // #217
-{VM_bitshift},                                 // #218 float(float number, float quantity) bitshift (EXT_BITSHIFT)
+{VM_bitshift, 2, 2},                                   // #218 float(float number, float quantity) bitshift (EXT_BITSHIFT)
 NULL,                                                  // #219
 NULL,                                                  // #220
-{VM_strstrofs},                                        // #221 float(string str, string sub[, float startpos]) strstrofs (FTE_STRINGS)
-{VM_str2chr},                                          // #222 float(string str, float ofs) str2chr (FTE_STRINGS)
-{VM_chr2str},                                          // #223 string(float c, ...) chr2str (FTE_STRINGS)
-{VM_strconv},                                          // #224 string(float ccase, float calpha, float cnum, string s, ...) strconv (FTE_STRINGS)
-{VM_strpad},                                           // #225 string(float chars, string s, ...) strpad (FTE_STRINGS)
-{VM_infoadd},                                          // #226 string(string info, string key, string value, ...) infoadd (FTE_STRINGS)
-{VM_infoget},                                          // #227 string(string info, string key) infoget (FTE_STRINGS)
-{VM_strncmp},                                          // #228 float(string s1, string s2, float len) strncmp (FTE_STRINGS)
-{VM_strncasecmp},                                      // #229 float(string s1, string s2) strcasecmp (FTE_STRINGS)
-{VM_strncasecmp},                                      // #230 float(string s1, string s2, float len) strncasecmp (FTE_STRINGS)
+{VM_strstrofs, 2, 3},                                  // #221 float(string str, string sub[, float startpos]) strstrofs (FTE_STRINGS)
+{VM_str2chr, 2, 2},                                            // #222 float(string str, float ofs) str2chr (FTE_STRINGS)
+{VM_chr2str, 1, -1},                                           // #223 string(float c, ...) chr2str (FTE_STRINGS)
+{VM_strconv, 3, 8},                                            // #224 string(float ccase, float calpha, float cnum, string s, ...) strconv (FTE_STRINGS)
+{VM_strpad, 1, 8},                                             // #225 string(float chars, string s, ...) strpad (FTE_STRINGS)
+{VM_infoadd, 2, 8},                                            // #226 string(string info, string key, string value, ...) infoadd (FTE_STRINGS)
+{VM_infoget, 2, 2},                                            // #227 string(string info, string key) infoget (FTE_STRINGS)
+{VM_strncmp, 2, 3},                                            // #228 float(string s1, string s2, float len) strncmp (FTE_STRINGS)
+{VM_strncasecmp, 2, 3},                                        // #229 float(string s1, string s2) strcasecmp (FTE_STRINGS)
+{VM_strncasecmp, 2, 3},                                        // #230 float(string s1, string s2, float len) strncasecmp (FTE_STRINGS)
 NULL,                                                  // #231
 NULL,                                                  // #232 void(float index, float type, .void field) SV_AddStat (EXT_CSQC)
 NULL,                                                  // #233
@@ -5178,12 +5178,12 @@ NULL,                                                   // #236
 NULL,                                                  // #237
 NULL,                                                  // #238
 NULL,                                                  // #239
-{VM_CL_checkpvs},                                      // #240
+{VM_CL_checkpvs, 2, 2},                                        // #240
 NULL,                                                  // #241
 NULL,                                                  // #242
 NULL,                                                  // #243
 NULL,                                                  // #244
-{VM_modulo},                                           // #245
+{VM_modulo, 2, 2},                                             // #245
 NULL,                                                  // #246
 NULL,                                                  // #247
 NULL,                                                  // #248
@@ -5201,21 +5201,21 @@ NULL,                                                   // #259
 NULL,                                                  // #260
 NULL,                                                  // #261
 NULL,                                                  // #262
-{VM_CL_skel_create},                           // #263 float(float modlindex) skel_create = #263; // (FTE_CSQC_SKELETONOBJECTS) create a skeleton (be sure to assign this value into .skeletonindex for use), returns skeleton index (1 or higher) on success, returns 0 on failure  (for example if the modelindex is not skeletal), it is recommended that you create a new skeleton if you change modelindex.
-{VM_CL_skel_build},                            // #264 float(float skel, entity ent, float modlindex, float retainfrac, float firstbone, float lastbone) skel_build = #264; // (FTE_CSQC_SKELETONOBJECTS) blend in a percentage of standard animation, 0 replaces entirely, 1 does nothing, 0.5 blends half, etc, and this only alters the bones in the specified range for which out of bounds values like 0,100000 are safe (uses .frame, .frame2, .frame3, .frame4, .lerpfrac, .lerpfrac3, .lerpfrac4, .frame1time, .frame2time, .frame3time, .frame4time), returns skel on success, 0 on failure
-{VM_CL_skel_get_numbones},             // #265 float(float skel) skel_get_numbones = #265; // (FTE_CSQC_SKELETONOBJECTS) returns how many bones exist in the created skeleton
-{VM_CL_skel_get_bonename},             // #266 string(float skel, float bonenum) skel_get_bonename = #266; // (FTE_CSQC_SKELETONOBJECTS) returns name of bone (as a tempstring)
-{VM_CL_skel_get_boneparent},           // #267 float(float skel, float bonenum) skel_get_boneparent = #267; // (FTE_CSQC_SKELETONOBJECTS) returns parent num for supplied bonenum, -1 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
-{VM_CL_skel_find_bone},                        // #268 float(float skel, string tagname) skel_find_bone = #268; // (FTE_CSQC_SKELETONOBJECTS) get number of bone with specified name, 0 on failure, tagindex (bonenum+1) on success, same as using gettagindex on the modelindex
-{VM_CL_skel_get_bonerel},                      // #269 vector(float skel, float bonenum) skel_get_bonerel = #269; // (FTE_CSQC_SKELETONOBJECTS) get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)
-{VM_CL_skel_get_boneabs},                      // #270 vector(float skel, float bonenum) skel_get_boneabs = #270; // (FTE_CSQC_SKELETONOBJECTS) get matrix of bone in skeleton in model space - sets v_forward, v_right, v_up, returns origin (relative to entity)
-{VM_CL_skel_set_bone},                 // #271 void(float skel, float bonenum, vector org) skel_set_bone = #271; // (FTE_CSQC_SKELETONOBJECTS) set matrix of bone relative to its parent, reads v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
-{VM_CL_skel_mul_bone},                 // #272 void(float skel, float bonenum, vector org) skel_mul_bone = #272; // (FTE_CSQC_SKELETONOBJECTS) transform bone matrix (relative to its parent) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
-{VM_CL_skel_mul_bones},                        // #273 void(float skel, float startbone, float endbone, vector org) skel_mul_bones = #273; // (FTE_CSQC_SKELETONOBJECTS) transform bone matrices (relative to their parents) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bones)
-{VM_CL_skel_copybones},                        // #274 void(float skeldst, float skelsrc, float startbone, float endbone) skel_copybones = #274; // (FTE_CSQC_SKELETONOBJECTS) copy bone matrices (relative to their parents) from one skeleton to another, useful for copying a skeleton to a corpse
-{VM_CL_skel_delete},                           // #275 void(float skel) skel_delete = #275; // (FTE_CSQC_SKELETONOBJECTS) deletes skeleton at the beginning of the next frame (you can add the entity, delete the skeleton, renderscene, and it will still work)
-{VM_CL_frameforname},                          // #276 float(float modlindex, string framename) frameforname = #276; // (FTE_CSQC_SKELETONOBJECTS) finds number of a specified frame in the animation, returns -1 if no match found
-{VM_CL_frameduration},                 // #277 float(float modlindex, float framenum) frameduration = #277; // (FTE_CSQC_SKELETONOBJECTS) returns the intended play time (in seconds) of the specified framegroup, if it does not exist the result is 0, if it is a single frame it may be a small value around 0.1 or 0.
+{VM_CL_skel_create, 1, 1},                             // #263 float(float modlindex) skel_create = #263; // (FTE_CSQC_SKELETONOBJECTS) create a skeleton (be sure to assign this value into .skeletonindex for use), returns skeleton index (1 or higher) on success, returns 0 on failure  (for example if the modelindex is not skeletal), it is recommended that you create a new skeleton if you change modelindex.
+{VM_CL_skel_build, 6, 6},                              // #264 float(float skel, entity ent, float modlindex, float retainfrac, float firstbone, float lastbone) skel_build = #264; // (FTE_CSQC_SKELETONOBJECTS) blend in a percentage of standard animation, 0 replaces entirely, 1 does nothing, 0.5 blends half, etc, and this only alters the bones in the specified range for which out of bounds values like 0,100000 are safe (uses .frame, .frame2, .frame3, .frame4, .lerpfrac, .lerpfrac3, .lerpfrac4, .frame1time, .frame2time, .frame3time, .frame4time), returns skel on success, 0 on failure
+{VM_CL_skel_get_numbones, 1, 1},               // #265 float(float skel) skel_get_numbones = #265; // (FTE_CSQC_SKELETONOBJECTS) returns how many bones exist in the created skeleton
+{VM_CL_skel_get_bonename, 2, 2},               // #266 string(float skel, float bonenum) skel_get_bonename = #266; // (FTE_CSQC_SKELETONOBJECTS) returns name of bone (as a tempstring)
+{VM_CL_skel_get_boneparent, 2, 2},             // #267 float(float skel, float bonenum) skel_get_boneparent = #267; // (FTE_CSQC_SKELETONOBJECTS) returns parent num for supplied bonenum, -1 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
+{VM_CL_skel_find_bone, 2, 2},                  // #268 float(float skel, string tagname) skel_find_bone = #268; // (FTE_CSQC_SKELETONOBJECTS) get number of bone with specified name, 0 on failure, tagindex (bonenum+1) on success, same as using gettagindex on the modelindex
+{VM_CL_skel_get_bonerel, 2, 2},                        // #269 vector(float skel, float bonenum) skel_get_bonerel = #269; // (FTE_CSQC_SKELETONOBJECTS) get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)
+{VM_CL_skel_get_boneabs, 2, 2},                        // #270 vector(float skel, float bonenum) skel_get_boneabs = #270; // (FTE_CSQC_SKELETONOBJECTS) get matrix of bone in skeleton in model space - sets v_forward, v_right, v_up, returns origin (relative to entity)
+{VM_CL_skel_set_bone, 3, 3},                   // #271 void(float skel, float bonenum, vector org) skel_set_bone = #271; // (FTE_CSQC_SKELETONOBJECTS) set matrix of bone relative to its parent, reads v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
+{VM_CL_skel_mul_bone, 3, 3},                   // #272 void(float skel, float bonenum, vector org) skel_mul_bone = #272; // (FTE_CSQC_SKELETONOBJECTS) transform bone matrix (relative to its parent) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
+{VM_CL_skel_mul_bones, 4, 4},                  // #273 void(float skel, float startbone, float endbone, vector org) skel_mul_bones = #273; // (FTE_CSQC_SKELETONOBJECTS) transform bone matrices (relative to their parents) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bones)
+{VM_CL_skel_copybones, 4, 4},                  // #274 void(float skeldst, float skelsrc, float startbone, float endbone) skel_copybones = #274; // (FTE_CSQC_SKELETONOBJECTS) copy bone matrices (relative to their parents) from one skeleton to another, useful for copying a skeleton to a corpse
+{VM_CL_skel_delete, 1, 1},                             // #275 void(float skel) skel_delete = #275; // (FTE_CSQC_SKELETONOBJECTS) deletes skeleton at the beginning of the next frame (you can add the entity, delete the skeleton, renderscene, and it will still work)
+{VM_CL_frameforname, 2, 2},                            // #276 float(float modlindex, string framename) frameforname = #276; // (FTE_CSQC_SKELETONOBJECTS) finds number of a specified frame in the animation, returns -1 if no match found
+{VM_CL_frameduration, 2, 2},                   // #277 float(float modlindex, float framenum) frameduration = #277; // (FTE_CSQC_SKELETONOBJECTS) returns the intended play time (in seconds) of the specified framegroup, if it does not exist the result is 0, if it is a single frame it may be a small value around 0.1 or 0.
 NULL,                                                  // #278
 NULL,                                                  // #279
 NULL,                                                  // #280
@@ -5239,18 +5239,18 @@ NULL,                                                   // #297
 NULL,                                                  // #298
 NULL,                                                  // #299
 // CSQC range #300-#399
-{VM_CL_R_ClearScene},                          // #300 void() clearscene (EXT_CSQC)
-{VM_CL_R_AddEntities},                 // #301 void(float mask) addentities (EXT_CSQC)
-{VM_CL_R_AddEntity},                           // #302 void(entity ent) addentity (EXT_CSQC)
-{VM_CL_R_SetView},                             // #303 float(float property, ...) setproperty (EXT_CSQC)
-{VM_CL_R_RenderScene},                 // #304 void() renderscene (EXT_CSQC)
-{VM_CL_R_AddDynamicLight},             // #305 void(vector org, float radius, vector lightcolours) adddynamiclight (EXT_CSQC)
-{VM_CL_R_PolygonBegin},                        // #306 void(string texturename, float flag, float is2d[NYI: , float lines]) R_BeginPolygon
-{VM_CL_R_PolygonVertex},                       // #307 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex
-{VM_CL_R_PolygonEnd},                          // #308 void() R_EndPolygon
-{VM_CL_R_SetView},                             // #309 float(float property) getproperty (EXT_CSQC)
-{VM_CL_unproject},                             // #310 vector (vector v) cs_unproject (EXT_CSQC)
-{VM_CL_project},                                       // #311 vector (vector v) cs_project (EXT_CSQC)
+{VM_CL_R_ClearScene, 0, 0},                            // #300 void() clearscene (EXT_CSQC)
+{VM_CL_R_AddEntities, 1, 1},                   // #301 void(float mask) addentities (EXT_CSQC)
+{VM_CL_R_AddEntity, 1, 1},                             // #302 void(entity ent) addentity (EXT_CSQC)
+{VM_CL_R_SetView, 1, 3},                               // #303 float(float property, ...) setproperty (EXT_CSQC)
+{VM_CL_R_RenderScene, 0, 0},                   // #304 void() renderscene (EXT_CSQC)
+{VM_CL_R_AddDynamicLight, 3, 8},               // #305 void(vector org, float radius, vector lightcolours) adddynamiclight (EXT_CSQC)
+{VM_CL_R_PolygonBegin, 2, 3},                  // #306 void(string texturename, float flag, float is2d[NYI: , float lines]) R_BeginPolygon
+{VM_CL_R_PolygonVertex, 4, 4},                 // #307 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex
+{VM_CL_R_PolygonEnd, 0, 0},                            // #308 void() R_EndPolygon
+{VM_CL_R_SetView, 1, 3},                               // #309 float(float property) getproperty (EXT_CSQC)
+{VM_CL_unproject, 1, 1},                               // #310 vector (vector v) cs_unproject (EXT_CSQC)
+{VM_CL_project, 1, 1},                                 // #311 vector (vector v) cs_project (EXT_CSQC)
 NULL,                                                  // #312
 NULL,                                                  // #313
 NULL,                                                  // #314
@@ -5461,28 +5461,28 @@ NULL,                                                   // #509
 {VM_cvar_description, 1, 8},                                   // #518 float(string name) cvar_description = #518; (DP_QC_CVAR_DESCRIPTION)
 {VM_gettime, 0, 1},                                            // #519 float(float timer) gettime = #519; (DP_QC_GETTIME)
 {VM_keynumtostring, 1, 1},                             // #520 string keynumtostring(float keynum)
-{VM_findkeysforcommand},                       // #521 string findkeysforcommand(string command[, float bindmap])
-{VM_CL_InitParticleSpawner},           // #522 void(float max_themes) initparticlespawner (DP_CSQC_SPAWNPARTICLE)
-{VM_CL_ResetParticle},                 // #523 void() resetparticle (DP_CSQC_SPAWNPARTICLE)
-{VM_CL_ParticleTheme},                 // #524 void(float theme) particletheme (DP_CSQC_SPAWNPARTICLE)
-{VM_CL_ParticleThemeSave},             // #525 void() particlethemesave, void(float theme) particlethemeupdate (DP_CSQC_SPAWNPARTICLE)
-{VM_CL_ParticleThemeFree},             // #526 void() particlethemefree (DP_CSQC_SPAWNPARTICLE)
-{VM_CL_SpawnParticle},                 // #527 float(vector org, vector vel, [float theme]) particle (DP_CSQC_SPAWNPARTICLE)
-{VM_CL_SpawnParticleDelayed},          // #528 float(vector org, vector vel, float delay, float collisiondelay, [float theme]) delayedparticle (DP_CSQC_SPAWNPARTICLE)
-{VM_loadfromdata},                             // #529
-{VM_loadfromfile},                             // #530
-{VM_CL_setpause},                                      // #531 float(float ispaused) setpause = #531 (DP_CSQC_SETPAUSE)
-{VM_log},                                                      // #532
-{VM_getsoundtime},                             // #533 float(entity e, float channel) getsoundtime = #533; (DP_SND_GETSOUNDTIME)
-{VM_soundlength},                                      // #534 float(string sample) soundlength = #534; (DP_SND_GETSOUNDTIME)
-{VM_buf_loadfile},                // #535 float(string filename, float bufhandle) buf_loadfile (DP_QC_STRINGBUFFERS_EXT_WIP)
-{VM_buf_writefile},               // #536 float(float filehandle, float bufhandle, float startpos, float numstrings) buf_writefile (DP_QC_STRINGBUFFERS_EXT_WIP)
-{VM_bufstr_find},                 // #537 float(float bufhandle, string match, float matchrule, float startpos) bufstr_find (DP_QC_STRINGBUFFERS_EXT_WIP)
-{VM_matchpattern},                // #538 float(string s, string pattern, float matchrule) matchpattern (DP_QC_STRINGBUFFERS_EXT_WIP)
+{VM_findkeysforcommand, 1, 2},                 // #521 string findkeysforcommand(string command[, float bindmap])
+{VM_CL_InitParticleSpawner, 0, 1},             // #522 void(float max_themes) initparticlespawner (DP_CSQC_SPAWNPARTICLE)
+{VM_CL_ResetParticle, 0, 0},                   // #523 void() resetparticle (DP_CSQC_SPAWNPARTICLE)
+{VM_CL_ParticleTheme, 1, 1},                   // #524 void(float theme) particletheme (DP_CSQC_SPAWNPARTICLE)
+{VM_CL_ParticleThemeSave, 0, 1},               // #525 void() particlethemesave, void(float theme) particlethemeupdate (DP_CSQC_SPAWNPARTICLE)
+{VM_CL_ParticleThemeFree, 1, 1},               // #526 void() particlethemefree (DP_CSQC_SPAWNPARTICLE)
+{VM_CL_SpawnParticle, 2, 3},                   // #527 float(vector org, vector vel, [float theme]) particle (DP_CSQC_SPAWNPARTICLE)
+{VM_CL_SpawnParticleDelayed, 4, 5},            // #528 float(vector org, vector vel, float delay, float collisiondelay, [float theme]) delayedparticle (DP_CSQC_SPAWNPARTICLE)
+{VM_loadfromdata, 1, 1},                               // #529
+{VM_loadfromfile, 1, 1},                               // #530
+{VM_CL_setpause, 1, 1},                                        // #531 float(float ispaused) setpause = #531 (DP_CSQC_SETPAUSE)
+{VM_log, 1, 1},                                                        // #532
+{VM_getsoundtime, 2, 2},                               // #533 float(entity e, float channel) getsoundtime = #533; (DP_SND_GETSOUNDTIME)
+{VM_soundlength, 1, 1},                                        // #534 float(string sample) soundlength = #534; (DP_SND_GETSOUNDTIME)
+{VM_buf_loadfile, 2, 2},                // #535 float(string filename, float bufhandle) buf_loadfile (DP_QC_STRINGBUFFERS_EXT_WIP)
+{VM_buf_writefile, 2, 4},               // #536 float(float filehandle, float bufhandle, float startpos, float numstrings) buf_writefile (DP_QC_STRINGBUFFERS_EXT_WIP)
+{VM_bufstr_find, 3, 5},                 // #537 float(float bufhandle, string match, float matchrule, float startpos) bufstr_find (DP_QC_STRINGBUFFERS_EXT_WIP)
+{VM_matchpattern, 2, 4},                // #538 float(string s, string pattern, float matchrule) matchpattern (DP_QC_STRINGBUFFERS_EXT_WIP)
 NULL,                                                  // #539
-{VM_physics_enable},                           // #540 void(entity e, float physics_enabled) physics_enable = #540; (DP_PHYSICS_ODE)
-{VM_physics_addforce},                 // #541 void(entity e, vector force, vector relative_ofs) physics_addforce = #541; (DP_PHYSICS_ODE)
-{VM_physics_addtorque},                        // #542 void(entity e, vector torque) physics_addtorque = #542; (DP_PHYSICS_ODE)
+{VM_physics_enable, 2, 2},                             // #540 void(entity e, float physics_enabled) physics_enable = #540; (DP_PHYSICS_ODE)
+{VM_physics_addforce, 3, 3},                   // #541 void(entity e, vector force, vector relative_ofs) physics_addforce = #541; (DP_PHYSICS_ODE)
+{VM_physics_addtorque, 2, 2},                  // #542 void(entity e, vector torque) physics_addtorque = #542; (DP_PHYSICS_ODE)
 NULL,                                                  // #543
 NULL,                                                  // #544
 NULL,                                                  // #545
@@ -5545,15 +5545,15 @@ NULL,                                                   // #601
 NULL,                                                  // #602
 NULL,                                                  // #603
 NULL,                                                  // #604
-{VM_callfunction},                             // #605
-{VM_writetofile},                                      // #606
-{VM_isfunction},                                       // #607
+{VM_callfunction, 1, 8},                               // #605
+{VM_writetofile, 2, 2},                                        // #606
+{VM_isfunction, 1, 1},                                 // #607
 NULL,                                                  // #608
 NULL,                                                  // #609
-{VM_findkeysforcommand},                       // #610 string findkeysforcommand(string command[, float bindmap])
+{VM_findkeysforcommand, 1, 2},                 // #610 string findkeysforcommand(string command[, float bindmap])
 NULL,                                                  // #611
 NULL,                                                  // #612
-{VM_parseentitydata},                          // #613
+{VM_parseentitydata, 2, 2},                            // #613
 NULL,                                                  // #614
 NULL,                                                  // #615
 NULL,                                                  // #616
@@ -5564,25 +5564,25 @@ NULL,                                                   // #620
 NULL,                                                  // #621
 NULL,                                                  // #622
 NULL,                                                  // #623
-{VM_CL_getextresponse},                        // #624 string getextresponse(void)
+{VM_CL_getextresponse, 0, 0},                  // #624 string getextresponse(void)
 NULL,                                                  // #625
 NULL,                                                  // #626
-{VM_sprintf},                     // #627 string sprintf(string format, ...)
-{VM_getsurfacenumtriangles},           // #628 float(entity e, float s) getsurfacenumpoints (DP_QC_GETSURFACETRIANGLE)
-{VM_getsurfacetriangle},                       // #629 vector(entity e, float s, float n) getsurfacepoint (DP_QC_GETSURFACETRIANGLE)
-{VM_setkeybind},                                               // #630 float(float key, string bind[, float bindmap]) setkeybind
-{VM_getbindmaps},                                              // #631 vector(void) getbindmap
-{VM_setbindmaps},                                              // #632 float(vector bm) setbindmap
+{VM_sprintf, 1, -1},                     // #627 string sprintf(string format, ...)
+{VM_getsurfacenumtriangles, 2, 2},             // #628 float(entity e, float s) getsurfacenumpoints (DP_QC_GETSURFACETRIANGLE)
+{VM_getsurfacetriangle, 3, 3},                 // #629 vector(entity e, float s, float n) getsurfacepoint (DP_QC_GETSURFACETRIANGLE)
+{VM_setkeybind, 2, 3},                                         // #630 float(float key, string bind[, float bindmap]) setkeybind
+{VM_getbindmaps, 0, 0},                                                // #631 vector(void) getbindmap
+{VM_setbindmaps, 1, 1},                                                // #632 float(vector bm) setbindmap
 NULL,                                                  // #633
 NULL,                                                  // #634
 NULL,                                                  // #635
 NULL,                                                  // #636
 NULL,                                                  // #637
-{VM_CL_RotateMoves},                                   // #638
-{VM_digest_hex},                                               // #639
-{VM_CL_V_CalcRefdef},                                  // #640 void(entity e) V_CalcRefdef (DP_CSQC_V_CALCREFDEF)
+{VM_CL_RotateMoves, 1, 1},                                     // #638
+{VM_digest_hex, 2, 8},                                         // #639
+{VM_CL_V_CalcRefdef, 2, 2},                                    // #640 void(entity e) V_CalcRefdef (DP_CSQC_V_CALCREFDEF)
 NULL,                                                  // #641
-{VM_coverage},                                         // #642
+{VM_coverage, 0, 0},                                           // #642
 NULL
 };