- FS_Printf (f,"\"%s\" ", name);
- FS_Printf (f,"\"%s\"\n", PR_UglyValueString(type, (eval_t *)&pr_globals[def->ofs]));
+ FS_Printf(f,"\"%s\" ", name);
+ FS_Printf(f,"\"%s\"\n", PR_UglyValueString(type, (eval_t *)&pr_globals[def->ofs]));
+ }
+ FS_Print(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_Print("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;