FS_Printf (f,"}\n");
}
+/*
+=============
+ED_EdictSet_f
+
+Console command to set a field of a specified edict
+=============
+*/
+void ED_EdictSet_f(void)
+{
+ edict_t *ed;
+ ddef_t *key;
+
+ if(Cmd_Argc() != 4)
+ {
+ Con_Printf("edictset <edict number> <field> <value>\n");
+ return;
+ }
+ ed = EDICT_NUM(atoi(Cmd_Argv(1)));
+
+ if((key = ED_FindField(Cmd_Argv(2))) == 0)
+ {
+ Con_Printf("Key %s not found !\n", Cmd_Argv(2));
+ return;
+ }
+
+ ED_ParseEpair(ed, key, Cmd_Argv(3));
+}
+
/*
=============
ED_ParseGlobals
Cmd_AddCommand ("edict", ED_PrintEdict_f);
Cmd_AddCommand ("edicts", ED_PrintEdicts);
Cmd_AddCommand ("edictcount", ED_Count);
+ Cmd_AddCommand ("edictset", ED_EdictSet_f);
Cmd_AddCommand ("profile", PR_Profile_f);
Cmd_AddCommand ("pr_fields", PR_Fields_f);
Cmd_AddCommand ("pr_globals", PR_Globals_f);
return new;
}
-
/*
=============
PRVM_ED_ParseEval
return true;
}
+/*
+=============
+PRVM_ED_EdictSet_f
+
+Console command to set a field of a specified edict
+=============
+*/
+void PRVM_ED_EdictSet_f(void)
+{
+ prvm_edict_t *ed;
+ ddef_t *key;
+
+ if(Cmd_Argc() != 5)
+ {
+ Con_Printf("prvm_edictset <program name> <edict number> <field> <value>\n");
+ return;
+ }
+
+ PRVM_Begin;
+ if(!PRVM_SetProgFromString(Cmd_Argv(1)))
+ {
+ Con_Printf("Wrong program name %s !\n", Cmd_Argv(1));
+ return;
+ }
+
+ ed = PRVM_EDICT_NUM(atoi(Cmd_Argv(2)));
+
+ if((key = PRVM_ED_FindField(Cmd_Argv(3))) == 0)
+ {
+ Con_Printf("Key %s not found !\n", Cmd_Argv(3));
+ return;
+ }
+
+ PRVM_ED_ParseEpair(ed, key, Cmd_Argv(4));
+
+ PRVM_End;
+}
+
/*
====================
PRVM_ED_ParseEdict
Cmd_AddCommand ("prvm_profile", PRVM_Profile_f);
Cmd_AddCommand ("prvm_fields", PRVM_Fields_f);
Cmd_AddCommand ("prvm_globals", PRVM_Globals_f);
+ Cmd_AddCommand ("prvm_edictset", PRVM_ED_EdictSet_f);
// LordHavoc: optional runtime bounds checking (speed drain, but worth it for security, on by default - breaks most QCCX features (used by CRMod and others))
Cvar_RegisterVariable (&prvm_boundscheck);
Cvar_RegisterVariable (&prvm_traceqc);
1 lhfire: get lhfire_gui build from Tomaz.
1 lhfire: post lhfire_gui build.
1 lhfire: prepare example scripts for release.
-2 darkplaces: add a "edictset" command to console to set a single field of an edict to the specified value
+-n darkplaces: add a "edictset" command to console to set a single field of an edict to the specified value
2 darkplaces: add a flag/effect/whatever for double sided entity rendering (disable cull face for this entity) (yummyluv)
2 darkplaces: add and document DP_SOUND_DIRECTIONLESSATTNNONE extension
2 darkplaces: add and document DP_SOUND_STEREOWAV extension