//============================================================================
// Server
-cvar_t sv_aim = {CVAR_SAVE, "sv_aim", "2", "maximum cosine angle for quake's vertical autoaim, a value above 1 completely disables the autoaim, quake used 0.93"}; //"0.93"}; // LordHavoc: disabled autoaim by default
+cvar_t sv_aim = {CVAR_SAVE, "sv_aim", "2", "maximum cosine angle for quake's vertical autoaim, a value above 1 completely disables the autoaim, quake used 0.93"};
char *vm_sv_extensions =
"DP_QC_STRFTIME "
"DP_QC_STRINGBUFFERS "
"DP_QC_STRINGCOLORFUNCTIONS "
+"DP_QC_TOKENIZEBYSEPARATOR "
"DP_QC_TRACEBOX "
"DP_QC_TRACETOSS "
"DP_QC_TRACE_MOVETYPE_HITMODEL "
int entnum;
char string[VM_STRINGTEMP_LENGTH];
+ VM_VarString(1, string, sizeof(string));
+
VM_SAFEPARMCOUNTRANGE(2, 8, VM_SV_sprint);
entnum = PRVM_G_EDICTNUM(OFS_PARM0);
+ // LordHavoc: div0 requested that sprintto world operate like print
+ if (entnum == 0)
+ {
+ Con_Print(string);
+ return;
+ }
if (entnum < 1 || entnum > svs.maxclients || !svs.clients[entnum-1].active)
{
if (!client->netconnection)
return;
- VM_VarString(1, string, sizeof(string));
MSG_WriteChar(&client->netconnection->message,svc_print);
MSG_WriteString(&client->netconnection->message, string);
}
*/
static void VM_SV_checkbottom (void)
{
- VM_SAFEPARMCOUNT(0, VM_SV_checkbottom);
+ VM_SAFEPARMCOUNT(1, VM_SV_checkbottom);
PRVM_G_FLOAT(OFS_RETURN) = SV_CheckBottom (PRVM_G_EDICT(OFS_PARM0));
}
prvm_edict_t *ent;
int i, large;
- VM_SAFEPARMCOUNT(1, VM_SV_makestatic);
+ // allow 0 parameters due to an id1 qc bug in which this function is used
+ // with no parameters (but directly after setmodel with self in OFS_PARM0)
+ VM_SAFEPARMCOUNTRANGE(0, 1, VM_SV_makestatic);
- ent = PRVM_G_EDICT(OFS_PARM0);
+ if (prog->argc >= 1)
+ ent = PRVM_G_EDICT(OFS_PARM0);
+ else
+ ent = PRVM_PROG_TO_EDICT(prog->globals.server->self);
if (ent == prog->edicts)
{
VM_Warning("makestatic: can not modify world entity\n");
int i;
client_t *client;
- VM_SAFEPARMCOUNT(0, VM_SV_setspawnparms);
+ VM_SAFEPARMCOUNT(1, VM_SV_setspawnparms);
ent = PRVM_G_EDICT(OFS_PARM0);
i = PRVM_NUM_FOR_EDICT(ent);
}
}
-// void(float index, float type, .void field) SV_AddStat = #470;
+// void(float index, float type, .void field) SV_AddStat = #232;
// Set up an auto-sent player stat.
// Client's get thier own fields sent to them. Index may not be less than 32.
// Type is a value equating to the ev_ values found in qcc to dictate types. Valid ones are:
int off, i;
unsigned char type;
- VM_SAFEPARMCOUNT(2, VM_SV_AddStat);
+ VM_SAFEPARMCOUNT(3, VM_SV_AddStat);
if(!vm_autosentstats)
{
VM_strlennocol, // #476 float(string s) : DRESK - String Length (not counting color codes) (DP_QC_STRINGCOLORFUNCTIONS)
VM_strdecolorize, // #477 string(string s) : DRESK - Decolorized String (DP_SV_STRINGCOLORFUNCTIONS)
VM_strftime, // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME)
-NULL, // #479
+VM_tokenizebyseparator, // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR)
NULL, // #480
NULL, // #481
NULL, // #482