int eval_clientcolors;
int eval_tag_entity;
int eval_tag_index;
+int eval_light_lev;
+int eval_color;
+int eval_style;
+int eval_pflags;
mfunction_t *SV_PlayerPhysicsQC;
mfunction_t *EndFrameQC;
eval_clientcolors = FindFieldOffset("clientcolors");
eval_tag_entity = FindFieldOffset("tag_entity");
eval_tag_index = FindFieldOffset("tag_index");
+ eval_light_lev = FindFieldOffset("light_lev");
+ eval_color = FindFieldOffset("color");
+ eval_style = FindFieldOffset("style");
+ eval_pflags = FindFieldOffset("pflags");
// LordHavoc: allowing QuakeC to override the player movement code
SV_PlayerPhysicsQC = ED_FindFunction ("SV_PlayerPhysics");
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
{ev_vector, "punchvector"},
{ev_float, "clientcolors"},
{ev_entity, "tag_entity"},
- {ev_float, "tag_index"}
+ {ev_float, "tag_index"},
+ {ev_float, "light_lev"},
+ {ev_float, "color"},
+ {ev_float, "style"},
+ {ev_float, "pflags"}
};
/*
if (progs->version != PROG_VERSION)
Host_Error ("progs.dat has wrong version number (%i should be %i)", progs->version, PROG_VERSION);
- if (progs->crc != PROGHEADER_CRC)
+ if (progs->crc != PROGHEADER_CRC && progs->crc != 32401) // tenebrae crc also allowed
Host_Error ("progs.dat system vars have been modified, progdefs.h is out of date");
//pr_functions = (dfunction_t *)((qbyte *)progs + progs->ofs_functions);
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);