particle_t *part;
int themenum;
- VM_SAFEPARMCOUNTRANGE(2, 3, VM_CL_SpawnParticle2);
+ VM_SAFEPARMCOUNTRANGE(2, 3, VM_CL_SpawnParticle);
if (vmpartspawner.verified == false)
{
VM_Warning(prog, "VM_CL_SpawnParticle: particle spawner not initialized\n");
particle_t *part;
int themenum;
- VM_SAFEPARMCOUNTRANGE(4, 5, VM_CL_SpawnParticle2);
+ VM_SAFEPARMCOUNTRANGE(4, 5, VM_CL_SpawnParticleDelayed);
if (vmpartspawner.verified == false)
{
- VM_Warning(prog, "VM_CL_SpawnParticle: particle spawner not initialized\n");
+ VM_Warning(prog, "VM_CL_SpawnParticleDelayed: particle spawner not initialized\n");
PRVM_G_FLOAT(OFS_RETURN) = 0;
return;
}
themenum = (int)PRVM_G_FLOAT(OFS_PARM4);
if (themenum <= 0 || themenum >= vmpartspawner.max_themes)
{
- VM_Warning(prog, "VM_CL_SpawnParticle: bad theme number %i\n", themenum);
+ VM_Warning(prog, "VM_CL_SpawnParticleDelayed: bad theme number %i\n", themenum);
PRVM_G_FLOAT(OFS_RETURN) = 0;
return;
}
{
int entnum, fieldnum;
vec3_t forward, left, up, org;
- VM_SAFEPARMCOUNT(2, VM_CL_GetEntityVec);
+ VM_SAFEPARMCOUNT(2, VM_CL_GetEntity);
entnum = PRVM_G_FLOAT(OFS_PARM0);
if (entnum < 0 || entnum >= cl.num_entities)
unsigned char fatpvs[MAX_MAP_LEAFS/8];
#endif
- VM_SAFEPARMCOUNT(2, VM_SV_checkpvs);
+ VM_SAFEPARMCOUNT(2, VM_CL_checkpvs);
VectorCopy(PRVM_G_VECTOR(OFS_PARM0), viewpos);
viewee = PRVM_G_EDICT(OFS_PARM1);
static void VM_M_getresolution(prvm_prog_t *prog)
{
int nr, fs;
- VM_SAFEPARMCOUNTRANGE(1, 2, VM_getresolution);
+ VM_SAFEPARMCOUNTRANGE(1, 2, VM_M_getresolution);
nr = (int)PRVM_G_FLOAT(OFS_PARM0);
const serverlist_entry_t *cache;
int hostnr;
- VM_SAFEPARMCOUNT(2, VM_M_getserverliststring);
+ VM_SAFEPARMCOUNT(2, VM_M_getserverlistnumber);
PRVM_G_INT(OFS_RETURN) = OFS_NULL;
int i;
char keyfp[FP64_SIZE + 1];
- VM_SAFEPARMCOUNT(1,VM_M_crypto_getmykey);
+ VM_SAFEPARMCOUNT(1, VM_M_crypto_getmykeyfp);
i = PRVM_G_FLOAT( OFS_PARM0 );
switch(Crypto_RetrieveLocalKey(i, keyfp, sizeof(keyfp), NULL, 0, NULL))
int i;
char idfp[FP64_SIZE + 1];
- VM_SAFEPARMCOUNT(1,VM_M_crypto_getmykey);
+ VM_SAFEPARMCOUNT(1, VM_M_crypto_getmyidfp);
i = PRVM_G_FLOAT( OFS_PARM0 );
switch(Crypto_RetrieveLocalKey(i, NULL, 0, idfp, sizeof(idfp), NULL))
int i;
qboolean issigned;
- VM_SAFEPARMCOUNT(1,VM_M_crypto_getmykey);
+ VM_SAFEPARMCOUNT(1, VM_M_crypto_getmyidstatus);
i = PRVM_G_FLOAT( OFS_PARM0 );
switch(Crypto_RetrieveLocalKey(i, NULL, 0, NULL, 0, &issigned))
void VM_localcmd_client(prvm_prog_t *prog)
{
char string[VM_STRINGTEMP_LENGTH];
- VM_SAFEPARMCOUNTRANGE(1, 8, VM_localcmd);
+ VM_SAFEPARMCOUNTRANGE(1, 8, VM_localcmd_client);
VM_VarString(prog, 0, string, sizeof(string));
Cbuf_AddText(&cmd_client, string);
}
void VM_localcmd_server(prvm_prog_t *prog)
{
char string[VM_STRINGTEMP_LENGTH];
- VM_SAFEPARMCOUNTRANGE(1, 8, VM_localcmd);
+ VM_SAFEPARMCOUNTRANGE(1, 8, VM_localcmd_server);
VM_VarString(prog, 0, string, sizeof(string));
Cbuf_AddText(&cmd_server, string);
}
cvar_t *cvar;
int ret;
- VM_SAFEPARMCOUNTRANGE(1,8,VM_cvar);
+ VM_SAFEPARMCOUNTRANGE(1, 8, VM_cvar_type);
VM_VarString(prog, 0, string, sizeof(string));
VM_CheckEmptyString(prog, string);
cvar = Cvar_FindVar(prog->console_cmd->cvars, string, prog->console_cmd->cvars_flagsmask);
char string[VM_STRINGTEMP_LENGTH];
int search_len, replace_len, subject_len;
- VM_SAFEPARMCOUNT(3,VM_strreplace);
+ VM_SAFEPARMCOUNT(3, VM_strireplace);
search = PRVM_G_STRING(OFS_PARM0);
replace = PRVM_G_STRING(OFS_PARM1);
{
const char *p;
- VM_SAFEPARMCOUNT(1,VM_tokenize);
+ VM_SAFEPARMCOUNT(1, VM_tokenize_console);
strlcpy(tokenize_string, PRVM_G_STRING(OFS_PARM0), sizeof(tokenize_string));
p = tokenize_string;
*/
void VM_isserver(prvm_prog_t *prog)
{
- VM_SAFEPARMCOUNT(0,VM_serverstate);
+ VM_SAFEPARMCOUNT(0, VM_isserver);
PRVM_G_FLOAT(OFS_RETURN) = sv.active;
}
*/
void VM_loadfromdata(prvm_prog_t *prog)
{
- VM_SAFEPARMCOUNT(1,VM_loadentsfromfile);
+ VM_SAFEPARMCOUNT(1, VM_loadfromdata);
PRVM_ED_LoadFromFile(prog, PRVM_G_STRING(OFS_PARM0));
}
void VM_modulo(prvm_prog_t *prog)
{
prvm_int_t val, m;
- VM_SAFEPARMCOUNT(2,VM_module);
+ VM_SAFEPARMCOUNT(2, VM_modulo);
val = (prvm_int_t) PRVM_G_FLOAT(OFS_PARM0);
m = (prvm_int_t) PRVM_G_FLOAT(OFS_PARM1);
void VM_search_getsize(prvm_prog_t *prog)
{
int handle;
- VM_SAFEPARMCOUNT(1, VM_M_search_getsize);
+ VM_SAFEPARMCOUNT(1, VM_search_getsize);
handle = (int)PRVM_G_FLOAT(OFS_PARM0);
int colors;
float sx, sy;
size_t maxlen = 0;
- VM_SAFEPARMCOUNTRANGE(2,3,VM_drawstring);
+ VM_SAFEPARMCOUNTRANGE(2, 3, VM_stringwidth);
getdrawfontscale(prog, &sx, &sy);
if(prog->argc == 3)
*/
void VM_stringtokeynum (prvm_prog_t *prog)
{
- VM_SAFEPARMCOUNT( 1, VM_keynumtostring );
+ VM_SAFEPARMCOUNT( 1, VM_stringtokeynum );
PRVM_G_FLOAT(OFS_RETURN) = Key_StringToKeynum(PRVM_G_STRING(OFS_PARM0));
}
void VM_getkeybind (prvm_prog_t *prog)
{
int bindmap;
- VM_SAFEPARMCOUNTRANGE(1, 2, VM_CL_getkeybind);
+ VM_SAFEPARMCOUNTRANGE(1, 2, VM_getkeybind);
if(prog->argc == 2)
bindmap = bound(-1, PRVM_G_FLOAT(OFS_PARM1), MAX_BINDMAPS-1);
else
void VM_setkeybind (prvm_prog_t *prog)
{
int bindmap;
- VM_SAFEPARMCOUNTRANGE(2, 3, VM_CL_setkeybind);
+ VM_SAFEPARMCOUNTRANGE(2, 3, VM_setkeybind);
if(prog->argc == 3)
bindmap = bound(-1, PRVM_G_FLOAT(OFS_PARM2), MAX_BINDMAPS-1);
else
void VM_getbindmaps (prvm_prog_t *prog)
{
int fg, bg;
- VM_SAFEPARMCOUNT(0, VM_CL_getbindmap);
+ VM_SAFEPARMCOUNT(0, VM_getbindmaps);
Key_GetBindMap(&fg, &bg);
PRVM_G_VECTOR(OFS_RETURN)[0] = fg;
PRVM_G_VECTOR(OFS_RETURN)[1] = bg;
*/
void VM_setbindmaps (prvm_prog_t *prog)
{
- VM_SAFEPARMCOUNT(1, VM_CL_setbindmap);
+ VM_SAFEPARMCOUNT(1, VM_setbindmaps);
PRVM_G_FLOAT(OFS_RETURN) = 0;
if(PRVM_G_VECTOR(OFS_PARM0)[2] == 0)
if(Key_SetBindMap((int)PRVM_G_VECTOR(OFS_PARM0)[0], (int)PRVM_G_VECTOR(OFS_PARM0)[1]))
clvideostate_t state;
clvideo_t *video;
- VM_SAFEPARMCOUNT( 2, VM_cin_netstate );
+ VM_SAFEPARMCOUNT( 2, VM_cin_setstate );
name = PRVM_G_STRING( OFS_PARM0 );
VM_CheckEmptyString(prog, name );
{
prvm_stringbuffer_t *stringbuffer;
int i;
-
+
VM_SAFEPARMCOUNTRANGE(0, 2, VM_buf_create);
-
+
// VorteX: optional parm1 (buffer format) is unfinished, to keep intact with future databuffers extension must be set to "string"
if(prog->argc >= 1 && strcmp(PRVM_G_STRING(OFS_PARM0), "string"))
{
int attributetype;
vec3_t result;
- VM_SAFEPARMCOUNT(4, VM_getsurfacepoint);
+ VM_SAFEPARMCOUNT(4, VM_getsurfacepointattribute);
VectorClear(PRVM_G_VECTOR(OFS_RETURN));
ed = PRVM_G_EDICT(OFS_PARM0);
if (!(model = getmodel(prog, ed)) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))
dp_model_t *model;
msurface_t *surface;
vec3_t p, out, inp;
- VM_SAFEPARMCOUNT(3, VM_te_getsurfaceclippedpoint);
+ VM_SAFEPARMCOUNT(3, VM_getsurfaceclippedpoint);
VectorClear(PRVM_G_VECTOR(OFS_RETURN));
ed = PRVM_G_EDICT(OFS_PARM0);
if (!(model = getmodel(prog, ed)) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))
{
dp_model_t *model;
msurface_t *surface;
- VM_SAFEPARMCOUNT(2, VM_SV_getsurfacenumtriangles);
+ VM_SAFEPARMCOUNT(2, VM_getsurfacenumtriangles);
// return 0 if no such surface
if (!(model = getmodel(prog, PRVM_G_EDICT(OFS_PARM0))) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))
{
dp_model_t *model;
msurface_t *surface;
int trinum;
- VM_SAFEPARMCOUNT(3, VM_SV_getsurfacetriangle);
+ VM_SAFEPARMCOUNT(3, VM_getsurfacetriangle);
VectorClear(PRVM_G_VECTOR(OFS_RETURN));
ed = PRVM_G_EDICT(OFS_PARM0);
if (!(model = getmodel(prog, ed)) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))