// NOTE: field offsets use -1 for NULL
typedef struct prvm_prog_fieldoffsets_s
{
- int classname; // common
- int chain; // common - used by find builtins
- int think; // common - used by OP_STATE
- int nextthink; // common - used by OP_STATE
- int frame; // common - used by OP_STATE
+ // server and client use a lot of similar fields, so this is combined
+ int SendEntity; // ssqc
+ int Version; // ssqc
+ int alpha; // ssqc / csqc
+ int ammo_cells1; // ssqc - Dissolution of Eternity mission pack
+ int ammo_lava_nails; // ssqc - Dissolution of Eternity mission pack
+ int ammo_multi_rockets; // ssqc - Dissolution of Eternity mission pack
+ int ammo_nails1; // ssqc - Dissolution of Eternity mission pack
+ int ammo_plasma; // ssqc - Dissolution of Eternity mission pack
+ int ammo_rockets1; // ssqc - Dissolution of Eternity mission pack
+ int ammo_shells1; // ssqc - Dissolution of Eternity mission pack
int angles; // common - used by changeyaw/changepitch
-
- int gravity; // ssqc
int button3; // ssqc
int button4; // ssqc
int button5; // ssqc
int button14; // ssqc
int button15; // ssqc
int button16; // ssqc
- int buttonuse; // ssqc
int buttonchat; // ssqc
+ int buttonuse; // ssqc
+ int chain; // common - used by find builtins
+ int classname; // common
+ int clientcolors; // ssqc
+ int color; // ssqc
+ int colormod; // ssqc / csqc
+ int contentstransition; // ssqc
+ int cursor_active; // ssqc
+ int cursor_screen; // ssqc
+ int cursor_trace_endpos; // ssqc
+ int cursor_trace_ent; // ssqc
+ int cursor_trace_start; // ssqc
+ int customizeentityforclient; // ssqc
+ int dimension_hit; // ssqc / csqc
+ int dimension_solid; // ssqc / csqc
+ int dphitcontentsmask; // ssqc / csqc
+ int drawonlytoclient; // ssqc
+ int effects; // ssqc / csqc
+ int exteriormodeltoclient; // ssqc
+ int fatness; // ssqc / csqc
+ int forceshader; // csqc
+ int frame1time; // csqc
+ int frame2; // csqc
+ int frame2time; // csqc
+ int frame; // common - used by OP_STATE
+ int fullbright; // ssqc - Nehahra support
+ int glow_color; // ssqc
int glow_size; // ssqc
int glow_trail; // ssqc
- int glow_color; // ssqc
- int items2; // ssqc
- int scale; // ssqc / csqc
- int alpha; // ssqc / csqc
- int renderamt; // ssqc - HalfLife support
- int rendermode; // ssqc - HalfLife support
- int fullbright; // ssqc - Nehahra support
- int ammo_shells1; // ssqc - Dissolution of Eternity mission pack
- int ammo_nails1; // ssqc - Dissolution of Eternity mission pack
- int ammo_lava_nails; // ssqc - Dissolution of Eternity mission pack
- int ammo_rockets1; // ssqc - Dissolution of Eternity mission pack
- int ammo_multi_rockets; // ssqc - Dissolution of Eternity mission pack
- int ammo_cells1; // ssqc - Dissolution of Eternity mission pack
- int ammo_plasma; // ssqc - Dissolution of Eternity mission pack
+ int gravity; // ssqc
+ int groundentity; // ssqc / csqc
+ int hull; // ssqc / csqc
int ideal_yaw; // ssqc / csqc
- int yaw_speed; // ssqc / csqc
int idealpitch; // ssqc / csqc
- int pitch_speed; // ssqc / csqc
- int viewmodelforclient; // ssqc
+ int items2; // ssqc
+ int lerpfrac; // csqc
+ int light_lev; // ssqc
+ int movement; // ssqc
+ int nextthink; // common - used by OP_STATE
int nodrawtoclient; // ssqc
- int exteriormodeltoclient; // ssqc
- int drawonlytoclient; // ssqc
+ int pflags; // ssqc
int ping; // ssqc
- int movement; // ssqc
+ int pitch_speed; // ssqc / csqc
+ int playermodel; // ssqc
+ int playerskin; // ssqc
int pmodel; // ssqc
int punchvector; // ssqc
- int viewzoom; // ssqc
- int clientcolors; // ssqc
- int tag_entity; // ssqc
- int tag_index; // ssqc
- int light_lev; // ssqc
- int color; // ssqc
+ int renderamt; // ssqc - HalfLife support
+ int renderflags; // csqc
+ int rendermode; // ssqc - HalfLife support
+ int scale; // ssqc / csqc
int style; // ssqc
- int pflags; // ssqc
- int cursor_active; // ssqc
- int cursor_screen; // ssqc
- int cursor_trace_start; // ssqc
- int cursor_trace_endpos; // ssqc
- int cursor_trace_ent; // ssqc
- int colormod; // ssqc / csqc
- int playermodel; // ssqc
- int playerskin; // ssqc
- int SendEntity; // ssqc
- int Version; // ssqc
- int customizeentityforclient; // ssqc
- int dphitcontentsmask; // ssqc
- int contentstransition; // ssqc
- //int fatness; // ssqc / csqc
- //int dimension_hit; // ssqc / csqc
- //int dimension_solid; // ssqc / csqc
-
- // csqc
- int frame2;
- int frame1time;
- int frame2time;
- int lerpfrac;
- int renderflags;
- //int forceshader;
- int groundentity;
- //int hull;
- int effects;
- //int tag_entity;
- //int tag_index;
- //int dphitcontentsmask;
-
- // mqc
+ int tag_entity; // ssqc / csqc
+ int tag_index; // ssqc / csqc
+ int think; // common - used by OP_STATE
+ int viewmodelforclient; // ssqc
+ int viewzoom; // ssqc
+ int yaw_speed; // ssqc / csqc
}
prvm_prog_fieldoffsets_t;
// NOTE: global offsets use -1 for NULL
typedef struct prvm_prog_globaloffsets_s
{
- // common
- int self;
- int time;
-
- // ssqc
- int trace_dpstartcontents;
- int trace_dphitcontents;
- int trace_dphitq3surfaceflags;
- int trace_dphittexturename;
- int SV_InitCmd;
-
- // csqc
-
- // mqc
+ // server and client use a lot of similar globals, so this is combined
+ int SV_InitCmd; // ssqc
+ int self; // common
+ int time; // ssqc / csqc
+ int v_forward; // ssqc / csqc
+ int v_right; // ssqc / csqc
+ int v_up; // ssqc / csqc
+ int trace_allsolid; // ssqc / csqc
+ int trace_startsolid; // ssqc / csqc
+ int trace_fraction; // ssqc / csqc
+ int trace_inwater; // ssqc / csqc
+ int trace_inopen; // ssqc / csqc
+ int trace_endpos; // ssqc / csqc
+ int trace_plane_normal; // ssqc / csqc
+ int trace_plane_dist; // ssqc / csqc
+ int trace_ent; // ssqc / csqc
+ int trace_dphitcontents; // ssqc / csqc
+ int trace_dphitq3surfaceflags; // ssqc / csqc
+ int trace_dphittexturename; // ssqc / csqc
+ int trace_dpstartcontents; // ssqc / csqc
}
prvm_prog_globaloffsets_t;
// NOTE: function offsets use 0 for NULL
typedef struct prvm_prog_funcoffsets_s
{
- // common
-
- // ssqc
- func_t SV_PlayerPhysics;
- func_t SV_ParseClientCommand;
- func_t SV_ChangeTeam;
- func_t EndFrame;
- func_t RestoreGame;
-
- // csqc
- func_t CSQC_Init;
- func_t CSQC_InputEvent;
- func_t CSQC_UpdateView;
- func_t CSQC_ConsoleCommand;
- func_t CSQC_Shutdown;
- func_t CSQC_Parse_TempEntity; //[515]: very helpfull when you want to create your own particles/decals/etc for effects that already exist
- func_t CSQC_Parse_StuffCmd;
- func_t CSQC_Parse_Print;
- func_t CSQC_Parse_CenterPrint;
- func_t CSQC_Ent_Update;
- func_t CSQC_Ent_Remove;
- func_t CSQC_Event; //[515]: engine call this for its own needs so csqc can do some things according to what engine it's running on. example: to say about edicts increase, whatever...
-
- // mqc
- func_t m_init;
-#ifdef NG_MENU
- func_t m_display;
- func_t m_hide;
-#endif
- func_t m_keydown;
- func_t m_keyup;
- func_t m_draw;
- func_t m_toggle;
- func_t m_shutdown;
+ func_t CSQC_ConsoleCommand; // csqc
+ func_t CSQC_Ent_Remove; // csqc
+ func_t CSQC_Ent_Update; // csqc
+ func_t CSQC_Event; // csqc [515]: engine call this for its own needs so csqc can do some things according to what engine it's running on. example: to say about edicts increase, whatever...
+ func_t CSQC_Init; // csqc
+ func_t CSQC_InputEvent; // csqc
+ func_t CSQC_Parse_CenterPrint; // csqc
+ func_t CSQC_Parse_Print; // csqc
+ func_t CSQC_Parse_StuffCmd; // csqc
+ func_t CSQC_Parse_TempEntity; // csqc [515]: very helpfull when you want to create your own particles/decals/etc for effects that already exist
+ func_t CSQC_Shutdown; // csqc
+ func_t CSQC_UpdateView; // csqc
+ func_t EndFrame; // ssqc
+ func_t RestoreGame; // ssqc
+ func_t SV_ChangeTeam; // ssqc
+ func_t SV_ParseClientCommand; // ssqc
+ func_t SV_PlayerPhysics; // ssqc
+
+ // menu qc only uses some functions, nothing else
+ func_t m_display; // mqc
+ func_t m_draw; // mqc
+ func_t m_hide; // mqc
+ func_t m_init; // mqc
+ func_t m_keydown; // mqc
+ func_t m_keyup; // mqc
+ func_t m_shutdown; // mqc
+ func_t m_toggle; // mqc
}
prvm_prog_funcoffsets_t;
extern const int vm_cl_numbuiltins;
extern const int vm_m_numbuiltins;
-extern char * vm_sv_extensions;
-extern char * vm_cl_extensions;
+extern char * vm_sv_extensions; // client also uses this
extern char * vm_m_extensions;
void VM_SV_Cmd_Init(void);
// functions use 0 for NULL
memset(&prog->funcoffsets, 0, sizeof(prog->funcoffsets));
- // common
- prog->fieldoffsets.classname = PRVM_ED_FindFieldOffset("classname");
- prog->fieldoffsets.chain = PRVM_ED_FindFieldOffset("chain");
- prog->fieldoffsets.think = PRVM_ED_FindFieldOffset("think");
- prog->fieldoffsets.nextthink = PRVM_ED_FindFieldOffset("nextthink");
- prog->fieldoffsets.frame = PRVM_ED_FindFieldOffset("frame");
- prog->fieldoffsets.angles = PRVM_ED_FindFieldOffset("angles");
- prog->globaloffsets.self = PRVM_ED_FindGlobalOffset("self");
- prog->globaloffsets.time = PRVM_ED_FindGlobalOffset("time");
-
- // ssqc
- prog->fieldoffsets.gravity = PRVM_ED_FindFieldOffset("gravity");
- prog->fieldoffsets.button3 = PRVM_ED_FindFieldOffset("button3");
- prog->fieldoffsets.button4 = PRVM_ED_FindFieldOffset("button4");
- prog->fieldoffsets.button5 = PRVM_ED_FindFieldOffset("button5");
- prog->fieldoffsets.button6 = PRVM_ED_FindFieldOffset("button6");
- prog->fieldoffsets.button7 = PRVM_ED_FindFieldOffset("button7");
- prog->fieldoffsets.button8 = PRVM_ED_FindFieldOffset("button8");
- prog->fieldoffsets.button9 = PRVM_ED_FindFieldOffset("button9");
- prog->fieldoffsets.button10 = PRVM_ED_FindFieldOffset("button10");
- prog->fieldoffsets.button11 = PRVM_ED_FindFieldOffset("button11");
- prog->fieldoffsets.button12 = PRVM_ED_FindFieldOffset("button12");
- prog->fieldoffsets.button13 = PRVM_ED_FindFieldOffset("button13");
- prog->fieldoffsets.button14 = PRVM_ED_FindFieldOffset("button14");
- prog->fieldoffsets.button15 = PRVM_ED_FindFieldOffset("button15");
- prog->fieldoffsets.button16 = PRVM_ED_FindFieldOffset("button16");
- prog->fieldoffsets.buttonuse = PRVM_ED_FindFieldOffset("buttonuse");
- prog->fieldoffsets.buttonchat = PRVM_ED_FindFieldOffset("buttonchat");
- prog->fieldoffsets.glow_size = PRVM_ED_FindFieldOffset("glow_size");
- prog->fieldoffsets.glow_trail = PRVM_ED_FindFieldOffset("glow_trail");
- prog->fieldoffsets.glow_color = PRVM_ED_FindFieldOffset("glow_color");
- prog->fieldoffsets.items2 = PRVM_ED_FindFieldOffset("items2");
- prog->fieldoffsets.scale = PRVM_ED_FindFieldOffset("scale");
- prog->fieldoffsets.alpha = PRVM_ED_FindFieldOffset("alpha");
- prog->fieldoffsets.renderamt = PRVM_ED_FindFieldOffset("renderamt"); // HalfLife support
- prog->fieldoffsets.rendermode = PRVM_ED_FindFieldOffset("rendermode"); // HalfLife support
- prog->fieldoffsets.fullbright = PRVM_ED_FindFieldOffset("fullbright");
- prog->fieldoffsets.ammo_shells1 = PRVM_ED_FindFieldOffset("ammo_shells1");
- prog->fieldoffsets.ammo_nails1 = PRVM_ED_FindFieldOffset("ammo_nails1");
- prog->fieldoffsets.ammo_lava_nails = PRVM_ED_FindFieldOffset("ammo_lava_nails");
- prog->fieldoffsets.ammo_rockets1 = PRVM_ED_FindFieldOffset("ammo_rockets1");
- prog->fieldoffsets.ammo_multi_rockets = PRVM_ED_FindFieldOffset("ammo_multi_rockets");
- prog->fieldoffsets.ammo_cells1 = PRVM_ED_FindFieldOffset("ammo_cells1");
- prog->fieldoffsets.ammo_plasma = PRVM_ED_FindFieldOffset("ammo_plasma");
- prog->fieldoffsets.ideal_yaw = PRVM_ED_FindFieldOffset("ideal_yaw");
- prog->fieldoffsets.yaw_speed = PRVM_ED_FindFieldOffset("yaw_speed");
- prog->fieldoffsets.idealpitch = PRVM_ED_FindFieldOffset("idealpitch");
- prog->fieldoffsets.pitch_speed = PRVM_ED_FindFieldOffset("pitch_speed");
- prog->fieldoffsets.viewmodelforclient = PRVM_ED_FindFieldOffset("viewmodelforclient");
- prog->fieldoffsets.nodrawtoclient = PRVM_ED_FindFieldOffset("nodrawtoclient");
- prog->fieldoffsets.exteriormodeltoclient = PRVM_ED_FindFieldOffset("exteriormodeltoclient");
- prog->fieldoffsets.drawonlytoclient = PRVM_ED_FindFieldOffset("drawonlytoclient");
- prog->fieldoffsets.ping = PRVM_ED_FindFieldOffset("ping");
- prog->fieldoffsets.movement = PRVM_ED_FindFieldOffset("movement");
- prog->fieldoffsets.pmodel = PRVM_ED_FindFieldOffset("pmodel");
- prog->fieldoffsets.punchvector = PRVM_ED_FindFieldOffset("punchvector");
- prog->fieldoffsets.viewzoom = PRVM_ED_FindFieldOffset("viewzoom");
- prog->fieldoffsets.clientcolors = PRVM_ED_FindFieldOffset("clientcolors");
- prog->fieldoffsets.tag_entity = PRVM_ED_FindFieldOffset("tag_entity");
- prog->fieldoffsets.tag_index = PRVM_ED_FindFieldOffset("tag_index");
- prog->fieldoffsets.light_lev = PRVM_ED_FindFieldOffset("light_lev");
- prog->fieldoffsets.color = PRVM_ED_FindFieldOffset("color");
- prog->fieldoffsets.style = PRVM_ED_FindFieldOffset("style");
- prog->fieldoffsets.pflags = PRVM_ED_FindFieldOffset("pflags");
- prog->fieldoffsets.cursor_active = PRVM_ED_FindFieldOffset("cursor_active");
- prog->fieldoffsets.cursor_screen = PRVM_ED_FindFieldOffset("cursor_screen");
- prog->fieldoffsets.cursor_trace_start = PRVM_ED_FindFieldOffset("cursor_trace_start");
- prog->fieldoffsets.cursor_trace_endpos = PRVM_ED_FindFieldOffset("cursor_trace_endpos");
- prog->fieldoffsets.cursor_trace_ent = PRVM_ED_FindFieldOffset("cursor_trace_ent");
- prog->fieldoffsets.colormod = PRVM_ED_FindFieldOffset("colormod");
- prog->fieldoffsets.playermodel = PRVM_ED_FindFieldOffset("playermodel");
- prog->fieldoffsets.playerskin = PRVM_ED_FindFieldOffset("playerskin");
- prog->fieldoffsets.SendEntity = PRVM_ED_FindFieldOffset("SendEntity");
- prog->fieldoffsets.Version = PRVM_ED_FindFieldOffset("Version");
- prog->fieldoffsets.customizeentityforclient = PRVM_ED_FindFieldOffset("customizeentityforclient");
- prog->fieldoffsets.dphitcontentsmask = PRVM_ED_FindFieldOffset("dphitcontentsmask");
- prog->fieldoffsets.contentstransition = PRVM_ED_FindFieldOffset("contentstransition");
- prog->globaloffsets.trace_dpstartcontents = PRVM_ED_FindGlobalOffset("trace_dpstartcontents");
- prog->globaloffsets.trace_dphitcontents = PRVM_ED_FindGlobalOffset("trace_dphitcontents");
- prog->globaloffsets.trace_dphitq3surfaceflags = PRVM_ED_FindGlobalOffset("trace_dphitq3surfaceflags");
- prog->globaloffsets.trace_dphittexturename = PRVM_ED_FindGlobalOffset("trace_dphittexturename");
- prog->globaloffsets.SV_InitCmd = PRVM_ED_FindGlobalOffset("SV_InitCmd");
- prog->funcoffsets.SV_ParseClientCommand = PRVM_ED_FindFunctionOffset("SV_ParseClientCommand");
- prog->funcoffsets.SV_PlayerPhysics = PRVM_ED_FindFunctionOffset("SV_PlayerPhysics");
- prog->funcoffsets.SV_ChangeTeam = PRVM_ED_FindFunctionOffset("SV_ChangeTeam");
- prog->funcoffsets.EndFrame = PRVM_ED_FindFunctionOffset("EndFrame");
- prog->funcoffsets.RestoreGame = PRVM_ED_FindFunctionOffset("RestoreGame");
-
- // csqc
- prog->fieldoffsets.alpha = PRVM_ED_FindFieldOffset("alpha");
- prog->fieldoffsets.scale = PRVM_ED_FindFieldOffset("scale");
- //prog->fieldoffsets.fatness = PRVM_ED_FindFieldOffset("fatness");
- prog->fieldoffsets.frame2 = PRVM_ED_FindFieldOffset("frame2");
- prog->fieldoffsets.frame1time = PRVM_ED_FindFieldOffset("frame1time");
- prog->fieldoffsets.frame2time = PRVM_ED_FindFieldOffset("frame2time");
- prog->fieldoffsets.lerpfrac = PRVM_ED_FindFieldOffset("lerpfrac");
- prog->fieldoffsets.renderflags = PRVM_ED_FindFieldOffset("renderflags");
- //prog->fieldoffsets.forceshader = PRVM_ED_FindFieldOffset("forceshader");
- //prog->fieldoffsets.dimension_hit = PRVM_ED_FindFieldOffset("dimension_hit");
- //prog->fieldoffsets.dimension_solid = PRVM_ED_FindFieldOffset("dimension_solid");
- //prog->fieldoffsets.groundentity = PRVM_ED_FindFieldOffset("groundentity");
- //prog->fieldoffsets.hull = PRVM_ED_FindFieldOffset("hull");
- prog->fieldoffsets.colormod = PRVM_ED_FindFieldOffset("colormod");
- prog->fieldoffsets.effects = PRVM_ED_FindFieldOffset("effects");
- prog->fieldoffsets.tag_entity = PRVM_ED_FindFieldOffset("tag_entity");
- prog->fieldoffsets.tag_index = PRVM_ED_FindFieldOffset("tag_index");
- prog->funcoffsets.CSQC_Init = PRVM_ED_FindFunctionOffset("CSQC_Init");
- prog->funcoffsets.CSQC_InputEvent = PRVM_ED_FindFunctionOffset("CSQC_InputEvent");
- prog->funcoffsets.CSQC_UpdateView = PRVM_ED_FindFunctionOffset("CSQC_UpdateView");
- prog->funcoffsets.CSQC_ConsoleCommand = PRVM_ED_FindFunctionOffset("CSQC_ConsoleCommand");
- prog->funcoffsets.CSQC_Shutdown = PRVM_ED_FindFunctionOffset("CSQC_Shutdown");
- prog->funcoffsets.CSQC_Parse_TempEntity = PRVM_ED_FindFunctionOffset("CSQC_Parse_TempEntity");
- prog->funcoffsets.CSQC_Parse_StuffCmd = PRVM_ED_FindFunctionOffset("CSQC_Parse_StuffCmd");
- prog->funcoffsets.CSQC_Parse_Print = PRVM_ED_FindFunctionOffset("CSQC_Parse_Print");
- prog->funcoffsets.CSQC_Parse_CenterPrint = PRVM_ED_FindFunctionOffset("CSQC_Parse_CenterPrint");
- prog->funcoffsets.CSQC_Ent_Update = PRVM_ED_FindFunctionOffset("CSQC_Ent_Update");
- prog->funcoffsets.CSQC_Ent_Remove = PRVM_ED_FindFunctionOffset("CSQC_Ent_Remove");
- prog->funcoffsets.CSQC_Event = PRVM_ED_FindFunctionOffset("CSQC_Event");
-
- // mqc
- prog->funcoffsets.m_init = PRVM_ED_FindFunctionOffset("m_init");
-#ifdef NG_MENU
- prog->funcoffsets.m_display = PRVM_ED_FindFunctionOffset("m_display");
- prog->funcoffsets.m_hide = PRVM_ED_FindFunctionOffset("m_hide");
-#endif
- prog->funcoffsets.m_keydown = PRVM_ED_FindFunctionOffset("m_keydown");
- prog->funcoffsets.m_keyup = PRVM_ED_FindFunctionOffset("m_keyup");
- prog->funcoffsets.m_draw = PRVM_ED_FindFunctionOffset("m_draw");
- prog->funcoffsets.m_toggle = PRVM_ED_FindFunctionOffset("m_toggle");
- prog->funcoffsets.m_shutdown = PRVM_ED_FindFunctionOffset("m_shutdown");
+ // server and client qc use a lot of similar fields, so this is combined
+ prog->fieldoffsets.SendEntity = PRVM_ED_FindFieldOffset("SendEntity");
+ prog->fieldoffsets.Version = PRVM_ED_FindFieldOffset("Version");
+ prog->fieldoffsets.alpha = PRVM_ED_FindFieldOffset("alpha");
+ prog->fieldoffsets.ammo_cells1 = PRVM_ED_FindFieldOffset("ammo_cells1");
+ prog->fieldoffsets.ammo_lava_nails = PRVM_ED_FindFieldOffset("ammo_lava_nails");
+ prog->fieldoffsets.ammo_multi_rockets = PRVM_ED_FindFieldOffset("ammo_multi_rockets");
+ prog->fieldoffsets.ammo_nails1 = PRVM_ED_FindFieldOffset("ammo_nails1");
+ prog->fieldoffsets.ammo_plasma = PRVM_ED_FindFieldOffset("ammo_plasma");
+ prog->fieldoffsets.ammo_rockets1 = PRVM_ED_FindFieldOffset("ammo_rockets1");
+ prog->fieldoffsets.ammo_shells1 = PRVM_ED_FindFieldOffset("ammo_shells1");
+ prog->fieldoffsets.angles = PRVM_ED_FindFieldOffset("angles");
+ prog->fieldoffsets.button3 = PRVM_ED_FindFieldOffset("button3");
+ prog->fieldoffsets.button4 = PRVM_ED_FindFieldOffset("button4");
+ prog->fieldoffsets.button5 = PRVM_ED_FindFieldOffset("button5");
+ prog->fieldoffsets.button6 = PRVM_ED_FindFieldOffset("button6");
+ prog->fieldoffsets.button7 = PRVM_ED_FindFieldOffset("button7");
+ prog->fieldoffsets.button8 = PRVM_ED_FindFieldOffset("button8");
+ prog->fieldoffsets.button9 = PRVM_ED_FindFieldOffset("button9");
+ prog->fieldoffsets.button10 = PRVM_ED_FindFieldOffset("button10");
+ prog->fieldoffsets.button11 = PRVM_ED_FindFieldOffset("button11");
+ prog->fieldoffsets.button12 = PRVM_ED_FindFieldOffset("button12");
+ prog->fieldoffsets.button13 = PRVM_ED_FindFieldOffset("button13");
+ prog->fieldoffsets.button14 = PRVM_ED_FindFieldOffset("button14");
+ prog->fieldoffsets.button15 = PRVM_ED_FindFieldOffset("button15");
+ prog->fieldoffsets.button16 = PRVM_ED_FindFieldOffset("button16");
+ prog->fieldoffsets.buttonchat = PRVM_ED_FindFieldOffset("buttonchat");
+ prog->fieldoffsets.buttonuse = PRVM_ED_FindFieldOffset("buttonuse");
+ prog->fieldoffsets.chain = PRVM_ED_FindFieldOffset("chain");
+ prog->fieldoffsets.classname = PRVM_ED_FindFieldOffset("classname");
+ prog->fieldoffsets.clientcolors = PRVM_ED_FindFieldOffset("clientcolors");
+ prog->fieldoffsets.color = PRVM_ED_FindFieldOffset("color");
+ prog->fieldoffsets.colormod = PRVM_ED_FindFieldOffset("colormod");
+ prog->fieldoffsets.contentstransition = PRVM_ED_FindFieldOffset("contentstransition");
+ prog->fieldoffsets.cursor_active = PRVM_ED_FindFieldOffset("cursor_active");
+ prog->fieldoffsets.cursor_screen = PRVM_ED_FindFieldOffset("cursor_screen");
+ prog->fieldoffsets.cursor_trace_endpos = PRVM_ED_FindFieldOffset("cursor_trace_endpos");
+ prog->fieldoffsets.cursor_trace_ent = PRVM_ED_FindFieldOffset("cursor_trace_ent");
+ prog->fieldoffsets.cursor_trace_start = PRVM_ED_FindFieldOffset("cursor_trace_start");
+ prog->fieldoffsets.customizeentityforclient = PRVM_ED_FindFieldOffset("customizeentityforclient");
+ prog->fieldoffsets.dimension_hit = PRVM_ED_FindFieldOffset("dimension_hit");
+ prog->fieldoffsets.dimension_solid = PRVM_ED_FindFieldOffset("dimension_solid");
+ prog->fieldoffsets.dphitcontentsmask = PRVM_ED_FindFieldOffset("dphitcontentsmask");
+ prog->fieldoffsets.drawonlytoclient = PRVM_ED_FindFieldOffset("drawonlytoclient");
+ prog->fieldoffsets.exteriormodeltoclient = PRVM_ED_FindFieldOffset("exteriormodeltoclient");
+ prog->fieldoffsets.fatness = PRVM_ED_FindFieldOffset("fatness");
+ prog->fieldoffsets.forceshader = PRVM_ED_FindFieldOffset("forceshader");
+ prog->fieldoffsets.frame = PRVM_ED_FindFieldOffset("frame");
+ prog->fieldoffsets.frame1time = PRVM_ED_FindFieldOffset("frame1time");
+ prog->fieldoffsets.frame2 = PRVM_ED_FindFieldOffset("frame2");
+ prog->fieldoffsets.frame2time = PRVM_ED_FindFieldOffset("frame2time");
+ prog->fieldoffsets.fullbright = PRVM_ED_FindFieldOffset("fullbright");
+ prog->fieldoffsets.glow_color = PRVM_ED_FindFieldOffset("glow_color");
+ prog->fieldoffsets.glow_size = PRVM_ED_FindFieldOffset("glow_size");
+ prog->fieldoffsets.glow_trail = PRVM_ED_FindFieldOffset("glow_trail");
+ prog->fieldoffsets.gravity = PRVM_ED_FindFieldOffset("gravity");
+ prog->fieldoffsets.groundentity = PRVM_ED_FindFieldOffset("groundentity");
+ prog->fieldoffsets.hull = PRVM_ED_FindFieldOffset("hull");
+ prog->fieldoffsets.ideal_yaw = PRVM_ED_FindFieldOffset("ideal_yaw");
+ prog->fieldoffsets.idealpitch = PRVM_ED_FindFieldOffset("idealpitch");
+ prog->fieldoffsets.items2 = PRVM_ED_FindFieldOffset("items2");
+ prog->fieldoffsets.lerpfrac = PRVM_ED_FindFieldOffset("lerpfrac");
+ prog->fieldoffsets.light_lev = PRVM_ED_FindFieldOffset("light_lev");
+ prog->fieldoffsets.movement = PRVM_ED_FindFieldOffset("movement");
+ prog->fieldoffsets.nextthink = PRVM_ED_FindFieldOffset("nextthink");
+ prog->fieldoffsets.nodrawtoclient = PRVM_ED_FindFieldOffset("nodrawtoclient");
+ prog->fieldoffsets.pflags = PRVM_ED_FindFieldOffset("pflags");
+ prog->fieldoffsets.ping = PRVM_ED_FindFieldOffset("ping");
+ prog->fieldoffsets.pitch_speed = PRVM_ED_FindFieldOffset("pitch_speed");
+ prog->fieldoffsets.playermodel = PRVM_ED_FindFieldOffset("playermodel");
+ prog->fieldoffsets.playerskin = PRVM_ED_FindFieldOffset("playerskin");
+ prog->fieldoffsets.pmodel = PRVM_ED_FindFieldOffset("pmodel");
+ prog->fieldoffsets.punchvector = PRVM_ED_FindFieldOffset("punchvector");
+ prog->fieldoffsets.renderamt = PRVM_ED_FindFieldOffset("renderamt"); // HalfLife support
+ prog->fieldoffsets.renderflags = PRVM_ED_FindFieldOffset("renderflags");
+ prog->fieldoffsets.rendermode = PRVM_ED_FindFieldOffset("rendermode"); // HalfLife support
+ prog->fieldoffsets.scale = PRVM_ED_FindFieldOffset("scale");
+ prog->fieldoffsets.style = PRVM_ED_FindFieldOffset("style");
+ prog->fieldoffsets.tag_entity = PRVM_ED_FindFieldOffset("tag_entity");
+ prog->fieldoffsets.tag_index = PRVM_ED_FindFieldOffset("tag_index");
+ prog->fieldoffsets.think = PRVM_ED_FindFieldOffset("think");
+ prog->fieldoffsets.viewmodelforclient = PRVM_ED_FindFieldOffset("viewmodelforclient");
+ prog->fieldoffsets.viewzoom = PRVM_ED_FindFieldOffset("viewzoom");
+ prog->fieldoffsets.yaw_speed = PRVM_ED_FindFieldOffset("yaw_speed");
+ prog->funcoffsets.CSQC_ConsoleCommand = PRVM_ED_FindFunctionOffset("CSQC_ConsoleCommand");
+ prog->funcoffsets.CSQC_Ent_Remove = PRVM_ED_FindFunctionOffset("CSQC_Ent_Remove");
+ prog->funcoffsets.CSQC_Ent_Update = PRVM_ED_FindFunctionOffset("CSQC_Ent_Update");
+ prog->funcoffsets.CSQC_Event = PRVM_ED_FindFunctionOffset("CSQC_Event");
+ prog->funcoffsets.CSQC_Init = PRVM_ED_FindFunctionOffset("CSQC_Init");
+ prog->funcoffsets.CSQC_InputEvent = PRVM_ED_FindFunctionOffset("CSQC_InputEvent");
+ prog->funcoffsets.CSQC_Parse_CenterPrint = PRVM_ED_FindFunctionOffset("CSQC_Parse_CenterPrint");
+ prog->funcoffsets.CSQC_Parse_Print = PRVM_ED_FindFunctionOffset("CSQC_Parse_Print");
+ prog->funcoffsets.CSQC_Parse_StuffCmd = PRVM_ED_FindFunctionOffset("CSQC_Parse_StuffCmd");
+ prog->funcoffsets.CSQC_Parse_TempEntity = PRVM_ED_FindFunctionOffset("CSQC_Parse_TempEntity");
+ prog->funcoffsets.CSQC_Shutdown = PRVM_ED_FindFunctionOffset("CSQC_Shutdown");
+ prog->funcoffsets.CSQC_UpdateView = PRVM_ED_FindFunctionOffset("CSQC_UpdateView");
+ prog->funcoffsets.EndFrame = PRVM_ED_FindFunctionOffset("EndFrame");
+ prog->funcoffsets.RestoreGame = PRVM_ED_FindFunctionOffset("RestoreGame");
+ prog->funcoffsets.SV_ChangeTeam = PRVM_ED_FindFunctionOffset("SV_ChangeTeam");
+ prog->funcoffsets.SV_ParseClientCommand = PRVM_ED_FindFunctionOffset("SV_ParseClientCommand");
+ prog->funcoffsets.SV_PlayerPhysics = PRVM_ED_FindFunctionOffset("SV_PlayerPhysics");
+ prog->globaloffsets.SV_InitCmd = PRVM_ED_FindGlobalOffset("SV_InitCmd");
+ prog->globaloffsets.self = PRVM_ED_FindGlobalOffset("self");
+ prog->globaloffsets.time = PRVM_ED_FindGlobalOffset("time");
+ prog->globaloffsets.v_forward = PRVM_ED_FindGlobalOffset("v_forward");
+ prog->globaloffsets.v_right = PRVM_ED_FindGlobalOffset("v_right");
+ prog->globaloffsets.v_up = PRVM_ED_FindGlobalOffset("v_up");
+ prog->globaloffsets.trace_allsolid = PRVM_ED_FindGlobalOffset("trace_allsolid");
+ prog->globaloffsets.trace_startsolid = PRVM_ED_FindGlobalOffset("trace_startsolid");
+ prog->globaloffsets.trace_fraction = PRVM_ED_FindGlobalOffset("trace_fraction");
+ prog->globaloffsets.trace_inwater = PRVM_ED_FindGlobalOffset("trace_inwater");
+ prog->globaloffsets.trace_inopen = PRVM_ED_FindGlobalOffset("trace_inopen");
+ prog->globaloffsets.trace_endpos = PRVM_ED_FindGlobalOffset("trace_endpos");
+ prog->globaloffsets.trace_plane_normal = PRVM_ED_FindGlobalOffset("trace_plane_normal");
+ prog->globaloffsets.trace_plane_dist = PRVM_ED_FindGlobalOffset("trace_plane_dist");
+ prog->globaloffsets.trace_ent = PRVM_ED_FindGlobalOffset("trace_ent");
+ prog->globaloffsets.trace_dphitcontents = PRVM_ED_FindGlobalOffset("trace_dphitcontents");
+ prog->globaloffsets.trace_dphitq3surfaceflags = PRVM_ED_FindGlobalOffset("trace_dphitq3surfaceflags");
+ prog->globaloffsets.trace_dphittexturename = PRVM_ED_FindGlobalOffset("trace_dphittexturename");
+ prog->globaloffsets.trace_dpstartcontents = PRVM_ED_FindGlobalOffset("trace_dpstartcontents");
+
+ // menu qc only uses some functions, nothing else
+ prog->funcoffsets.m_display = PRVM_ED_FindFunctionOffset("m_display");
+ prog->funcoffsets.m_draw = PRVM_ED_FindFunctionOffset("m_draw");
+ prog->funcoffsets.m_hide = PRVM_ED_FindFunctionOffset("m_hide");
+ prog->funcoffsets.m_init = PRVM_ED_FindFunctionOffset("m_init");
+ prog->funcoffsets.m_keydown = PRVM_ED_FindFunctionOffset("m_keydown");
+ prog->funcoffsets.m_keyup = PRVM_ED_FindFunctionOffset("m_keyup");
+ prog->funcoffsets.m_shutdown = PRVM_ED_FindFunctionOffset("m_shutdown");
+ prog->funcoffsets.m_toggle = PRVM_ED_FindFunctionOffset("m_toggle");
}
// not used