-// LordHavoc: in an effort to eliminate time wasted on GetEdictFieldValue... these are defined as externs in progs.h
-int eval_gravity;
-int eval_button3;
-int eval_button4;
-int eval_button5;
-int eval_button6;
-int eval_button7;
-int eval_button8;
-int eval_button9;
-int eval_button10;
-int eval_button11;
-int eval_button12;
-int eval_button13;
-int eval_button14;
-int eval_button15;
-int eval_button16;
-int eval_buttonuse;
-int eval_buttonchat;
-int eval_glow_size;
-int eval_glow_trail;
-int eval_glow_color;
-int eval_items2;
-int eval_scale;
-int eval_alpha;
-int eval_renderamt; // HalfLife support
-int eval_rendermode; // HalfLife support
-int eval_fullbright;
-int eval_ammo_shells1;
-int eval_ammo_nails1;
-int eval_ammo_lava_nails;
-int eval_ammo_rockets1;
-int eval_ammo_multi_rockets;
-int eval_ammo_cells1;
-int eval_ammo_plasma;
-int eval_idealpitch;
-int eval_pitch_speed;
-int eval_viewmodelforclient;
-int eval_nodrawtoclient;
-int eval_exteriormodeltoclient;
-int eval_drawonlytoclient;
-int eval_ping;
-int eval_movement;
-int eval_pmodel;
-int eval_punchvector;
-int eval_viewzoom;
-int eval_clientcolors;
-int eval_tag_entity;
-int eval_tag_index;
-int eval_light_lev;
-int eval_color;
-int eval_style;
-int eval_pflags;
-int eval_cursor_active;
-int eval_cursor_screen;
-int eval_cursor_trace_start;
-int eval_cursor_trace_endpos;
-int eval_cursor_trace_ent;
-int eval_colormod;
-int eval_playermodel;
-int eval_playerskin;
-int eval_SendEntity;
-int eval_Version;
-int eval_customizeentityforclient;
-int eval_dphitcontentsmask;
-
-int gval_trace_dpstartcontents;
-int gval_trace_dphitcontents;
-int gval_trace_dphitq3surfaceflags;
-int gval_trace_dphittexturename;
-
-mfunction_t *SV_PlayerPhysicsQC;
-mfunction_t *EndFrameQC;
-//KrimZon - SERVER COMMANDS IN QUAKEC
-mfunction_t *SV_ParseClientCommandQC;
-
-ddef_t *PRVM_ED_FindGlobal(const char *name);
-
-void SV_VM_FindEdictFieldOffsets(void)
-{
- eval_gravity = PRVM_ED_FindFieldOffset("gravity");
- eval_button3 = PRVM_ED_FindFieldOffset("button3");
- eval_button4 = PRVM_ED_FindFieldOffset("button4");
- eval_button5 = PRVM_ED_FindFieldOffset("button5");
- eval_button6 = PRVM_ED_FindFieldOffset("button6");
- eval_button7 = PRVM_ED_FindFieldOffset("button7");
- eval_button8 = PRVM_ED_FindFieldOffset("button8");
- eval_button9 = PRVM_ED_FindFieldOffset("button9");
- eval_button10 = PRVM_ED_FindFieldOffset("button10");
- eval_button11 = PRVM_ED_FindFieldOffset("button11");
- eval_button12 = PRVM_ED_FindFieldOffset("button12");
- eval_button13 = PRVM_ED_FindFieldOffset("button13");
- eval_button14 = PRVM_ED_FindFieldOffset("button14");
- eval_button15 = PRVM_ED_FindFieldOffset("button15");
- eval_button16 = PRVM_ED_FindFieldOffset("button16");
- eval_buttonuse = PRVM_ED_FindFieldOffset("buttonuse");
- eval_buttonchat = PRVM_ED_FindFieldOffset("buttonchat");
- eval_glow_size = PRVM_ED_FindFieldOffset("glow_size");
- eval_glow_trail = PRVM_ED_FindFieldOffset("glow_trail");
- eval_glow_color = PRVM_ED_FindFieldOffset("glow_color");
- eval_items2 = PRVM_ED_FindFieldOffset("items2");
- eval_scale = PRVM_ED_FindFieldOffset("scale");
- eval_alpha = PRVM_ED_FindFieldOffset("alpha");
- eval_renderamt = PRVM_ED_FindFieldOffset("renderamt"); // HalfLife support
- eval_rendermode = PRVM_ED_FindFieldOffset("rendermode"); // HalfLife support
- eval_fullbright = PRVM_ED_FindFieldOffset("fullbright");
- eval_ammo_shells1 = PRVM_ED_FindFieldOffset("ammo_shells1");
- eval_ammo_nails1 = PRVM_ED_FindFieldOffset("ammo_nails1");
- eval_ammo_lava_nails = PRVM_ED_FindFieldOffset("ammo_lava_nails");
- eval_ammo_rockets1 = PRVM_ED_FindFieldOffset("ammo_rockets1");
- eval_ammo_multi_rockets = PRVM_ED_FindFieldOffset("ammo_multi_rockets");
- eval_ammo_cells1 = PRVM_ED_FindFieldOffset("ammo_cells1");
- eval_ammo_plasma = PRVM_ED_FindFieldOffset("ammo_plasma");
- eval_idealpitch = PRVM_ED_FindFieldOffset("idealpitch");
- eval_pitch_speed = PRVM_ED_FindFieldOffset("pitch_speed");
- eval_viewmodelforclient = PRVM_ED_FindFieldOffset("viewmodelforclient");
- eval_nodrawtoclient = PRVM_ED_FindFieldOffset("nodrawtoclient");
- eval_exteriormodeltoclient = PRVM_ED_FindFieldOffset("exteriormodeltoclient");
- eval_drawonlytoclient = PRVM_ED_FindFieldOffset("drawonlytoclient");
- eval_ping = PRVM_ED_FindFieldOffset("ping");
- eval_movement = PRVM_ED_FindFieldOffset("movement");
- eval_pmodel = PRVM_ED_FindFieldOffset("pmodel");
- eval_punchvector = PRVM_ED_FindFieldOffset("punchvector");
- eval_viewzoom = PRVM_ED_FindFieldOffset("viewzoom");
- eval_clientcolors = PRVM_ED_FindFieldOffset("clientcolors");
- eval_tag_entity = PRVM_ED_FindFieldOffset("tag_entity");
- eval_tag_index = PRVM_ED_FindFieldOffset("tag_index");
- eval_light_lev = PRVM_ED_FindFieldOffset("light_lev");
- eval_color = PRVM_ED_FindFieldOffset("color");
- eval_style = PRVM_ED_FindFieldOffset("style");
- eval_pflags = PRVM_ED_FindFieldOffset("pflags");
- eval_cursor_active = PRVM_ED_FindFieldOffset("cursor_active");
- eval_cursor_screen = PRVM_ED_FindFieldOffset("cursor_screen");
- eval_cursor_trace_start = PRVM_ED_FindFieldOffset("cursor_trace_start");
- eval_cursor_trace_endpos = PRVM_ED_FindFieldOffset("cursor_trace_endpos");
- eval_cursor_trace_ent = PRVM_ED_FindFieldOffset("cursor_trace_ent");
- eval_colormod = PRVM_ED_FindFieldOffset("colormod");
- eval_playermodel = PRVM_ED_FindFieldOffset("playermodel");
- eval_playerskin = PRVM_ED_FindFieldOffset("playerskin");
- eval_SendEntity = PRVM_ED_FindFieldOffset("SendEntity");
- eval_Version = PRVM_ED_FindFieldOffset("Version");
- eval_customizeentityforclient = PRVM_ED_FindFieldOffset("customizeentityforclient");
- eval_dphitcontentsmask = PRVM_ED_FindFieldOffset("dphitcontentsmask");
-
- // LordHavoc: allowing QuakeC to override the player movement code
- SV_PlayerPhysicsQC = PRVM_ED_FindFunction ("SV_PlayerPhysics");
- // LordHavoc: support for endframe
- EndFrameQC = PRVM_ED_FindFunction ("EndFrame");
- //KrimZon - SERVER COMMANDS IN QUAKEC
- SV_ParseClientCommandQC = PRVM_ED_FindFunction ("SV_ParseClientCommand");
-
- //[515]: init stufftext string (it is sent before svc_serverinfo)
- if(PRVM_ED_FindGlobal("SV_InitCmd") && PRVM_ED_FindGlobal("SV_InitCmd")->type & ev_string)
- SV_InitCmd = PRVM_G_STRING(PRVM_ED_FindGlobal("SV_InitCmd")->ofs);
- else
- SV_InitCmd = NULL;
-
- gval_trace_dpstartcontents = PRVM_ED_FindGlobalOffset("trace_dpstartcontents");
- gval_trace_dphitcontents = PRVM_ED_FindGlobalOffset("trace_dphitcontents");
- gval_trace_dphitq3surfaceflags = PRVM_ED_FindGlobalOffset("trace_dphitq3surfaceflags");
- gval_trace_dphittexturename = PRVM_ED_FindGlobalOffset("trace_dphittexturename");
-}
-