*/
void VM_entityfieldname(prvm_prog_t *prog)
{
- ddef_t *d;
+ mdef_t *d;
int i = (int)PRVM_G_FLOAT(OFS_PARM0);
if (i < 0 || i >= prog->numfielddefs)
*/
void VM_entityfieldtype(prvm_prog_t *prog)
{
- ddef_t *d;
+ mdef_t *d;
int i = (int)PRVM_G_FLOAT(OFS_PARM0);
if (i < 0 || i >= prog->numfielddefs)
void VM_getentityfieldstring(prvm_prog_t *prog)
{
// put the data into a string
- ddef_t *d;
+ mdef_t *d;
int type, j;
prvm_eval_t *val;
prvm_edict_t * ent;
*/
void VM_putentityfieldstring(prvm_prog_t *prog)
{
- ddef_t *d;
+ mdef_t *d;
prvm_edict_t * ent;
int i = (int)PRVM_G_FLOAT(OFS_PARM0);
=========
VM_search_begin
-float search_begin(string pattern, float caseinsensitive, float quiet)
+float search_begin(string pattern, float caseinsensitive, float quiet[, string packfile])
=========
*/
void VM_search_begin(prvm_prog_t *prog)
{
int handle;
- const char *pattern;
+ const char *packfile = NULL, *pattern;
int caseinsens, quiet;
- VM_SAFEPARMCOUNT(3, VM_search_begin);
+ VM_SAFEPARMCOUNTRANGE(3, 4, VM_search_begin);
pattern = PRVM_G_STRING(OFS_PARM0);
caseinsens = (int)PRVM_G_FLOAT(OFS_PARM1);
quiet = (int)PRVM_G_FLOAT(OFS_PARM2);
+ // optional packfile parameter (DP_QC_FS_SEARCH_PACKFILE)
+ if(prog->argc >= 4)
+ packfile = PRVM_G_STRING(OFS_PARM3);
+
for(handle = 0; handle < PRVM_MAX_OPENSEARCHES; handle++)
if(!prog->opensearches[handle])
break;
return;
}
- if(!(prog->opensearches[handle] = FS_Search(pattern,caseinsens, quiet)))
+ if(!(prog->opensearches[handle] = FS_Search(pattern,caseinsens, quiet, packfile)))
PRVM_G_FLOAT(OFS_RETURN) = -1;
else
{
o += u8_strpad(o, end - o, buf, (flags & PRINTF_LEFT) != 0, width, precision);
}
break;
+ //spike FIXME -- 'S' for quoted tokenize-safe-or-print escaping of strings so stuff can safely survive console commands.
case 's':
if(flags & PRINTF_ALTERNATE)
{