34#define CSQC_RETURNVAL prog->globals.fp[OFS_RETURN]
61 prog->
error_cmd(
"%s: no CSQC_UpdateView (EXT_CSQC) or CSQC_DrawHud (CSQC_SIMPLE) function found in %s", prog->
name, filename);
64#define CL_REQFIELDS (sizeof(cl_reqfields) / sizeof(prvm_required_field_t))
68#define PRVM_DECLARE_serverglobalfloat(x)
69#define PRVM_DECLARE_serverglobalvector(x)
70#define PRVM_DECLARE_serverglobalstring(x)
71#define PRVM_DECLARE_serverglobaledict(x)
72#define PRVM_DECLARE_serverglobalfunction(x)
73#define PRVM_DECLARE_clientglobalfloat(x)
74#define PRVM_DECLARE_clientglobalvector(x)
75#define PRVM_DECLARE_clientglobalstring(x)
76#define PRVM_DECLARE_clientglobaledict(x)
77#define PRVM_DECLARE_clientglobalfunction(x)
78#define PRVM_DECLARE_menuglobalfloat(x)
79#define PRVM_DECLARE_menuglobalvector(x)
80#define PRVM_DECLARE_menuglobalstring(x)
81#define PRVM_DECLARE_menuglobaledict(x)
82#define PRVM_DECLARE_menuglobalfunction(x)
83#define PRVM_DECLARE_serverfieldfloat(x)
84#define PRVM_DECLARE_serverfieldvector(x)
85#define PRVM_DECLARE_serverfieldstring(x)
86#define PRVM_DECLARE_serverfieldedict(x)
87#define PRVM_DECLARE_serverfieldfunction(x)
88#define PRVM_DECLARE_clientfieldfloat(x) {ev_float, #x },
89#define PRVM_DECLARE_clientfieldvector(x) {ev_vector, #x },
90#define PRVM_DECLARE_clientfieldstring(x) {ev_string, #x },
91#define PRVM_DECLARE_clientfieldedict(x) {ev_entity, #x },
92#define PRVM_DECLARE_clientfieldfunction(x) {ev_function, #x },
93#define PRVM_DECLARE_menufieldfloat(x)
94#define PRVM_DECLARE_menufieldvector(x)
95#define PRVM_DECLARE_menufieldstring(x)
96#define PRVM_DECLARE_menufieldedict(x)
97#define PRVM_DECLARE_menufieldfunction(x)
98#define PRVM_DECLARE_serverfunction(x)
99#define PRVM_DECLARE_clientfunction(x)
100#define PRVM_DECLARE_menufunction(x)
101#define PRVM_DECLARE_field(x)
102#define PRVM_DECLARE_global(x)
103#define PRVM_DECLARE_function(x)
105#undef PRVM_DECLARE_serverglobalfloat
106#undef PRVM_DECLARE_serverglobalvector
107#undef PRVM_DECLARE_serverglobalstring
108#undef PRVM_DECLARE_serverglobaledict
109#undef PRVM_DECLARE_serverglobalfunction
110#undef PRVM_DECLARE_clientglobalfloat
111#undef PRVM_DECLARE_clientglobalvector
112#undef PRVM_DECLARE_clientglobalstring
113#undef PRVM_DECLARE_clientglobaledict
114#undef PRVM_DECLARE_clientglobalfunction
115#undef PRVM_DECLARE_menuglobalfloat
116#undef PRVM_DECLARE_menuglobalvector
117#undef PRVM_DECLARE_menuglobalstring
118#undef PRVM_DECLARE_menuglobaledict
119#undef PRVM_DECLARE_menuglobalfunction
120#undef PRVM_DECLARE_serverfieldfloat
121#undef PRVM_DECLARE_serverfieldvector
122#undef PRVM_DECLARE_serverfieldstring
123#undef PRVM_DECLARE_serverfieldedict
124#undef PRVM_DECLARE_serverfieldfunction
125#undef PRVM_DECLARE_clientfieldfloat
126#undef PRVM_DECLARE_clientfieldvector
127#undef PRVM_DECLARE_clientfieldstring
128#undef PRVM_DECLARE_clientfieldedict
129#undef PRVM_DECLARE_clientfieldfunction
130#undef PRVM_DECLARE_menufieldfloat
131#undef PRVM_DECLARE_menufieldvector
132#undef PRVM_DECLARE_menufieldstring
133#undef PRVM_DECLARE_menufieldedict
134#undef PRVM_DECLARE_menufieldfunction
135#undef PRVM_DECLARE_serverfunction
136#undef PRVM_DECLARE_clientfunction
137#undef PRVM_DECLARE_menufunction
138#undef PRVM_DECLARE_field
139#undef PRVM_DECLARE_global
140#undef PRVM_DECLARE_function
143#define CL_REQGLOBALS (sizeof(cl_reqglobals) / sizeof(prvm_required_field_t))
147#define PRVM_DECLARE_serverglobalfloat(x)
148#define PRVM_DECLARE_serverglobalvector(x)
149#define PRVM_DECLARE_serverglobalstring(x)
150#define PRVM_DECLARE_serverglobaledict(x)
151#define PRVM_DECLARE_serverglobalfunction(x)
152#define PRVM_DECLARE_clientglobalfloat(x) {ev_float, #x},
153#define PRVM_DECLARE_clientglobalvector(x) {ev_vector, #x},
154#define PRVM_DECLARE_clientglobalstring(x) {ev_string, #x},
155#define PRVM_DECLARE_clientglobaledict(x) {ev_entity, #x},
156#define PRVM_DECLARE_clientglobalfunction(x) {ev_function, #x},
157#define PRVM_DECLARE_menuglobalfloat(x)
158#define PRVM_DECLARE_menuglobalvector(x)
159#define PRVM_DECLARE_menuglobalstring(x)
160#define PRVM_DECLARE_menuglobaledict(x)
161#define PRVM_DECLARE_menuglobalfunction(x)
162#define PRVM_DECLARE_serverfieldfloat(x)
163#define PRVM_DECLARE_serverfieldvector(x)
164#define PRVM_DECLARE_serverfieldstring(x)
165#define PRVM_DECLARE_serverfieldedict(x)
166#define PRVM_DECLARE_serverfieldfunction(x)
167#define PRVM_DECLARE_clientfieldfloat(x)
168#define PRVM_DECLARE_clientfieldvector(x)
169#define PRVM_DECLARE_clientfieldstring(x)
170#define PRVM_DECLARE_clientfieldedict(x)
171#define PRVM_DECLARE_clientfieldfunction(x)
172#define PRVM_DECLARE_menufieldfloat(x)
173#define PRVM_DECLARE_menufieldvector(x)
174#define PRVM_DECLARE_menufieldstring(x)
175#define PRVM_DECLARE_menufieldedict(x)
176#define PRVM_DECLARE_menufieldfunction(x)
177#define PRVM_DECLARE_serverfunction(x)
178#define PRVM_DECLARE_clientfunction(x)
179#define PRVM_DECLARE_menufunction(x)
180#define PRVM_DECLARE_field(x)
181#define PRVM_DECLARE_global(x)
182#define PRVM_DECLARE_function(x)
184#undef PRVM_DECLARE_serverglobalfloat
185#undef PRVM_DECLARE_serverglobalvector
186#undef PRVM_DECLARE_serverglobalstring
187#undef PRVM_DECLARE_serverglobaledict
188#undef PRVM_DECLARE_serverglobalfunction
189#undef PRVM_DECLARE_clientglobalfloat
190#undef PRVM_DECLARE_clientglobalvector
191#undef PRVM_DECLARE_clientglobalstring
192#undef PRVM_DECLARE_clientglobaledict
193#undef PRVM_DECLARE_clientglobalfunction
194#undef PRVM_DECLARE_menuglobalfloat
195#undef PRVM_DECLARE_menuglobalvector
196#undef PRVM_DECLARE_menuglobalstring
197#undef PRVM_DECLARE_menuglobaledict
198#undef PRVM_DECLARE_menuglobalfunction
199#undef PRVM_DECLARE_serverfieldfloat
200#undef PRVM_DECLARE_serverfieldvector
201#undef PRVM_DECLARE_serverfieldstring
202#undef PRVM_DECLARE_serverfieldedict
203#undef PRVM_DECLARE_serverfieldfunction
204#undef PRVM_DECLARE_clientfieldfloat
205#undef PRVM_DECLARE_clientfieldvector
206#undef PRVM_DECLARE_clientfieldstring
207#undef PRVM_DECLARE_clientfieldedict
208#undef PRVM_DECLARE_clientfieldfunction
209#undef PRVM_DECLARE_menufieldfloat
210#undef PRVM_DECLARE_menufieldvector
211#undef PRVM_DECLARE_menufieldstring
212#undef PRVM_DECLARE_menufieldedict
213#undef PRVM_DECLARE_menufieldfunction
214#undef PRVM_DECLARE_serverfunction
215#undef PRVM_DECLARE_clientfunction
216#undef PRVM_DECLARE_menufunction
217#undef PRVM_DECLARE_field
218#undef PRVM_DECLARE_global
219#undef PRVM_DECLARE_function
333 entrender->
flags = 0;
335 entrender->
alpha = 1;
336 entrender->
scale = 1;
362 if (!entrender->
alpha)
363 entrender->
alpha = 1.0f;
364 if (!entrender->
scale)
423 && (entrender->
alpha >= 1)
447 if (ed->
priv.
server->skeleton.relativetransforms)
607 int restorevm_tempstringsbuf_cursize;
647 int restorevm_tempstringsbuf_cursize;
664 if(msg[msg_len - 1] !=
'\n' && msg[msg_len - 1] !=
'\r')
674 memcpy(start, msg, writebytes);
679 memcpy(start, msg, writebytes);
692 int restorevm_tempstringsbuf_cursize;
778static float CL_VM_Event (
float event)
801 unsigned short entnum, oldself, realentnum;
805 Host_Error (
"CSQC_ReadEntities: CSQC is not loaded");
816 realentnum =
entnum & 0x7FFF;
891 memset(entrender, 0,
sizeof(*entrender));
899 memset(entrender, 0,
sizeof(*entrender));
942 int packetsize =
buf->maxsize - 7;
943 int npackets = ((
int)len + packetsize - 1) / (packetsize);
953 MSG_WriteString(
buf,
va(vabuf,
sizeof(vabuf),
"\ncl_downloadbegin %lu %s\n", (
unsigned long)len, filename));
956 else if(cnt >= 1 && cnt <= npackets)
958 unsigned long thispacketoffset = (cnt - 1) * packetsize;
959 int thispacketsize = (
int)len - thispacketoffset;
960 if(thispacketsize > packetsize)
961 thispacketsize = packetsize;
970 else if(cnt == npackets + 1)
973 MSG_WriteString(
buf,
va(vabuf,
sizeof(vabuf),
"\ncl_downloadfinished %lu %d\n", (
unsigned long)len, crc));
983 const char* csprogsfn =
NULL;
984 unsigned char *csprogsdata =
NULL;
986 int csprogsdatacrc, requiredcrc;
1004 csprogsfn =
va(vabuf,
sizeof(vabuf),
"dlcache/%s.%i.%i",
csqc_progname.
string, requiredsize, requiredcrc);
1007 Con_DPrintf(
"Using buffered \"%s\"\n", csprogsfn);
1026 csprogsdatacrc =
CRC_Block(csprogsdata, (
size_t)csprogsdatasize);
1027 if (csprogsdatacrc != requiredcrc || csprogsdatasize != requiredsize)
1031 Con_Printf(
CON_WARN "Warning: Your %s is not the same version as the demo was recorded with (CRC/size are %i/%i but should be %i/%i)\n",
csqc_progname.
string, csprogsdatacrc, (
int)csprogsdatasize, requiredcrc, requiredsize);
1040 CL_DisconnectEx(
false,
"Your %s is not the same version as the server (CRC is %i/%i but should be %i/%i)\n",
csqc_progname.
string, csprogsdatacrc, (
int)csprogsdatasize, requiredcrc, requiredsize);
1047 if (requiredcrc >= 0)
1057 prog->
name =
"client";
1085 Host_Error(
"CSQC %s failed to load\n", csprogsfn);
1097 sb.
data = (
unsigned char *)
buf;
1188 if (
mod &&
mod->soundfromcenter)
1210 if(viewmatrix && clipplane && visorigin)
model_t * CL_GetModelFromEdict(prvm_edict_t *ed)
void CL_LinkEdict(prvm_edict_t *ent)
void CL_PasteDemo(unsigned char **buf, fs_offset_t *filesize)
void CL_CutDemo(unsigned char **buf, fs_offset_t *filesize)
void CL_WriteDemoMessage(sizebuf_t *message)
void CL_DisconnectEx(qbool kicked, const char *fmt,...)
void CL_UpdateRenderEntity(entity_render_t *ent)
entity_render_t * CL_NewTempEntity(double shadertime)
void CL_ExpandCSQCRenderEntities(int num)
void CL_SetEntityColormapColors(entity_render_t *ent, int colormap)
void SCR_CenterPrint(const char *str)
void CLVM_init_cmd(prvm_prog_t *prog)
prvm_builtin_t vm_cl_builtins[]
int CL_GetTagMatrix(prvm_prog_t *prog, matrix4x4_t *out, prvm_edict_t *ent, int tagindex, prvm_vec_t *returnshadingorigin)
void CLVM_reset_cmd(prvm_prog_t *prog)
void CSQC_R_RecalcView(void)
const int vm_cl_numbuiltins
void Cbuf_AddText(cmd_state_t *cmd, const char *text)
void Cmd_ClearCSQCCommands(cmd_state_t *cmd)
void Cmd_ExecuteString(cmd_state_t *cmd, const char *text, size_t textlen, cmd_source_t src, qbool lockmutex)
Parses a single line of text into arguments and tries to execute it.
cmd_state_t * cmd_local
command interpreter for local commands injected by SVQC, CSQC, MQC, server or client engine code uses...
@ src_local
from the command buffer
unsigned short CRC_Block(const unsigned char *data, size_t size)
void MSG_WriteShort(sizebuf_t *sb, int c)
void MSG_WriteString(sizebuf_t *sb, const char *s)
void MSG_WriteLong(sizebuf_t *sb, int c)
void MSG_WriteByte(sizebuf_t *sb, int c)
void SZ_Clear(sizebuf_t *buf)
char * va(char *buf, size_t buflen, const char *format,...)
void SZ_Write(sizebuf_t *buf, const unsigned char *data, int length)
@ PROTOCOL_NEHAHRAMOVIE
Nehahra movie protocol, a big nasty hack dating back to early days of the Quake Standards Group (but ...
@ PROTOCOL_QUAKEWORLD
quakeworld protocol
void Con_Print(const char *msg)
Prints to all appropriate console targets, and adds timestamps.
void Con_DPrintf(const char *fmt,...)
A Con_Printf that only shows up if the "developer" cvar is set.
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
void Con_DPrint(const char *msg)
A Con_Print that only shows up if the "developer" cvar is set.
int CL_VM_GetViewEntity(void)
void CL_VM_PreventInformationLeaks(void)
prvm_required_field_t cl_reqglobals[]
qbool MakeDownloadPacket(const char *filename, unsigned char *data, size_t len, int crc, int cnt, sizebuf_t *buf, int protocol)
static qbool CLVM_load_edict(prvm_prog_t *prog, prvm_edict_t *ent)
qbool CL_VM_ConsoleCommand(const char *text, size_t textlen)
void CSQC_AddPrintText(const char *msg, size_t msg_len)
void CSQC_UpdateNetworkTimes(double newtime, double oldtime)
static void CLVM_init_edict(prvm_prog_t *prog, prvm_edict_t *e)
static void CL_VM_UpdateCoopDeathmatchGlobals(int gametype)
static void CL_VM_Parse_Print(const char *msg, size_t msg_len)
void CL_VM_Parse_StuffCmd(const char *msg, size_t msg_len)
static void CLVM_begin_increase_edicts(prvm_prog_t *prog)
static void CL_CheckRequiredFuncs(prvm_prog_t *prog, const char *filename)
Previous DP versions declined to load csprogs if it lacked any of: CSQC_Init, CSQC_InputEvent,...
void CL_VM_UpdateShowingScoresState(int showingscores)
void CL_VM_UpdateIntermissionState(int intermission)
static void CLVM_end_increase_edicts(prvm_prog_t *prog)
static void CLVM_free_edict(prvm_prog_t *prog, prvm_edict_t *ed)
r_refdef_view_t csqc_main_r_refdef_view
static void CLVM_count_edicts(prvm_prog_t *prog)
qbool CL_VM_Event_Sound(int sound_num, float fvolume, int channel, float attenuation, int ent, vec3_t pos, int flags, float speed)
qbool CL_VM_InputEvent(int eventtype, float x, float y)
void CL_VM_DrawHud(double frametime)
void CSQC_Think(prvm_edict_t *ed)
r_refdef_view_t csqc_original_r_refdef_view
void CSQC_ReadEntities(void)
void CL_VM_ShutDown(void)
qbool CL_VM_Parse_TempEntity(void)
qbool CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum)
qbool CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out)
qbool CL_VM_TransformView(int entnum, matrix4x4_t *viewmatrix, mplane_t *clipplane, vec3_t visorigin)
qbool CL_VM_UpdateView(double frametime)
void CL_VM_Parse_CenterPrint(const char *msg, size_t msg_len)
static void CSQC_SetGlobals(double frametime)
void CL_VM_UpdateDmgGlobals(int dmg_take, int dmg_save, vec3_t dmg_origin)
void CSQC_Predraw(prvm_edict_t *ed)
prvm_required_field_t cl_reqfields[]
#define RF_USETRANSPARENTOFFSET
#define RF_DYNAMICMODELLIGHT
void CSQC_UpdateView(float vid_width, float vid_height, float notmenu)
float mod(float dividend, float divisor)
float CSQC_InputEvent(float evtype, float scanx, float chary)
vector modellight_ambient
vector modellight_diffuse
float trace_networkentity
void CSQC_Init(float apilevel, string enginename, float engineversion)
void Cvar_SetValueQuick(cvar_t *var, float value)
unsigned char * FS_LoadFile(const char *path, mempool_t *pool, qbool quiet, fs_offset_t *filesizepointer)
static int(ZEXPORT *qz_inflate)(z_stream *strm
void R_RenderView_UpdateViewVectors(void)
void R_DecalSystem_Reset(decalsystem_t *decalsystem)
GLint GLenum GLint GLint y
GLsizeiptr const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
void Host_Error(const char *error,...)
void AnglesFromVectors(vec3_t angles, const vec3_t forward, const vec3_t up, qbool flippitch)
LadyHavoc: calculates pitch/yaw/roll angles from forward and up vectors.
#define VectorMAMAM(scale1, b1, scale2, b2, scale3, b3, out)
#define VectorSet(vec, x, y, z)
#define VectorCopy(in, out)
#define VectorScale(in, scale, out)
void Matrix4x4_Concat(matrix4x4_t *out, const matrix4x4_t *in1, const matrix4x4_t *in2)
void Matrix4x4_TransformPositivePlane(const matrix4x4_t *in, float x, float y, float z, float d, float *o)
int Matrix4x4_Invert_Full(matrix4x4_t *out, const matrix4x4_t *in1)
void Matrix4x4_FromVectors(matrix4x4_t *out, const float vx[3], const float vy[3], const float vz[3], const float t[3])
void Matrix4x4_ToVectors(const matrix4x4_t *in, float vx[3], float vy[3], float vz[3], float t[3])
void Matrix4x4_OriginFromMatrix(const matrix4x4_t *in, float *out)
static memexpandablearray_t models
#define PRVM_clientfunction(funcname)
int PRVM_SetTempString(prvm_prog_t *prog, const char *s, size_t slen)
Takes an strlen (not a buffer size).
#define PRVM_clientglobaledict(fieldname)
void PRVM_Prog_Load(prvm_prog_t *prog, const char *filename, unsigned char *data, fs_offset_t size, void CheckRequiredFuncs(prvm_prog_t *prog, const char *filename), int numrequiredfields, prvm_required_field_t *required_field, int numrequiredglobals, prvm_required_field_t *required_global)
void VM_UpdateEdictSkeleton(prvm_prog_t *prog, prvm_edict_t *ed, const struct model_s *edmodel, const struct frameblend_s *frameblend)
#define PRVM_EDICT_TO_PROG(e)
void PRVM_Prog_Init(prvm_prog_t *prog, struct cmd_state_s *cmd)
Initializing a vm: Call InitProg with the num Set up the fields marked with [INIT] in the prog struct...
mfunction_t * PRVM_ED_FindFunction(prvm_prog_t *prog, const char *name)
int PRVM_SetEngineString(prvm_prog_t *prog, const char *s)
const char * vm_sv_extensions[]
client also uses this
#define PRVM_EDICT_NUM(n)
#define PRVM_clientedictstring(ed, fieldname)
void PRVM_Prog_Reset(prvm_prog_t *prog)
void VM_GenerateFrameGroupBlend(prvm_prog_t *prog, struct framegroupblend_s *framegroupblend, const prvm_edict_t *ed)
#define PRVM_clientglobalfloat(fieldname)
#define PRVM_NUM_FOR_EDICT(e)
#define PRVM_clientedictfunction(ed, fieldname)
void PRVM_GarbageCollection(prvm_prog_t *prog)
void VM_RemoveEdictSkeleton(prvm_prog_t *prog, prvm_edict_t *ed)
#define PRVM_clientedictvector(ed, fieldname)
void CLVM_ExecuteProgram(prvm_prog_t *prog, func_t fnum, const char *errormessage)
#define PRVM_clientglobalvector(fieldname)
#define PRVM_clientedictfloat(ed, fieldname)
void VM_FrameBlendFromFrameGroupBlend(struct frameblend_s *frameblend, const struct framegroupblend_s *framegroupblend, const struct model_s *model, double curtime)
#define PRVM_clientglobalstring(fieldname)
prvm_edict_t * PRVM_ED_Alloc(prvm_prog_t *prog)
#define RENDER_EXTERIORMODEL
#define EF_DYNAMICMODELLIGHT
#define RENDER_DYNAMICMODELLIGHT
#define RENDER_WORLDOBJECT
#define RENDER_DOUBLESIDED
#define RENDER_NOSELFSHADOW
#define RENDER_CUSTOMIZEDMODELLIGHT
#define RENDER_NODEPTHTEST
void VM_ClearTraceGlobals(prvm_prog_t *prog)
qbool PRVM_ConsoleCommand(prvm_prog_t *prog, const char *text, size_t textlen, int *func, qbool preserve_self, int curself, double ptime, const char *error_message)
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
#define MAX_EDICTS
max number of objects in game world at once (32768 protocol limit)
#define NET_MAXMESSAGE
max reliable packet size (sent as multiple fragments of MAX_PACKETFRAGMENT)
prvm_vec_t prvm_vec3_t[3]
void R_TimeReport(const char *desc)
cvar_t cl_deathscoreboard
void Sbar_DeathmatchOverlay(void)
#define SOLID_BSP
bsp clip, touch on edge, block
#define CHAN_ENGINE2USER(c)
vec3_t csqc_viewanglesfromengine
char sound_name[MAX_SOUNDS][MAX_QPATH]
unsigned short csqc_server2csqcentitynumber[MAX_EDICTS]
size_t csqc_printtextbuf_len
strlen
vec3_t csqc_vieworiginfromengine
char worldbasename[MAX_QPATH]
struct model_s * worldmodel
usercmd_t movecmd[CL_MAX_USERCMDS]
entity_render_t * csqcrenderentities
char worldmessage[MAX_QPATH]
csqc_vidvars_t csqc_vidvars
char csqc_printtextbuf[MAX_INPUTLINE]
unsigned char * caughtcsprogsdata
unsigned int servermovesequence
fs_offset_t demo_lastcsprogssize
fs_offset_t caughtcsprogsdatasize
protocolversion_t protocol
frameblend_t frameblend[MAX_FRAMEBLENDS]
vec3_t custommodellight_lightdir
vec_t userwavefunc_param[Q3WAVEFUNC_USER_COUNT]
float custommodellight_origin[3]
vec3_t custommodellight_diffuse
decalsystem_t decalsystem
framegroupblend_t framegroupblend[MAX_FRAMEGROUPBLENDS]
vec3_t custommodellight_ambient
double realtime
the accumulated mainloop time since application started (with filtering), without any slowmo or clamp...
union prvm_edict_t::@30 fields
qbool free
true if this edict is unused
union prvm_edict_t::@29 priv
struct edict_engineprivate_s * server
FIXME: this server pointer really means world, not server (it is used by both server qc and client qc...
void(* reset_cmd)(struct prvm_prog_s *prog)
[INIT] used by PRVM_ResetProg
int entityfields
number of vec_t fields in progs (some variables are 3)
prvm_builtin_t * builtins
qbool loaded
used to indicate whether a prog is loaded
prvm_prog_funcoffsets_t funcoffsets
int edictprivate_size
size of the engine private struct
const char * name
name of the prog, e.g. "Server", "Client" or "Menu" (used for text output)
void(* begin_increase_edicts)(struct prvm_prog_s *prog)
[INIT] used by PRVM_MEM_Increase_Edicts
void(* free_edict)(struct prvm_prog_s *prog, prvm_edict_t *ed)
[INIT] used by PRVM_ED_Free
void(* error_cmd)(const char *format,...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN
[INIT]
int num_edicts
copies of some vars that were former read from sv
prvm_prog_fieldoffsets_t fieldoffsets
void(* count_edicts)(struct prvm_prog_s *prog)
[INIT] used by PRVM_ED_Count_f
double inittime
system time when QC initialization code finished (any entity created before is not a leak)
int limit_edicts
used instead of the constant MAX_EDICTS
prvm_prog_globaloffsets_t globaloffsets
unsigned flag
flag - used to store general flags like PRVM_GE_SELF, etc.
void(* init_edict)(struct prvm_prog_s *prog, prvm_edict_t *edict)
[INIT] used by PRVM_ED_ClearEdict
mempool_t * progs_mempool
all memory allocations related to this vm_prog (code, edicts, strings)
qbool polygonbegin_guess2d
indicates if polygonbegin should be interpreted as 2d (clearscene sets this to false,...
int max_edicts
number of edicts for which space has been (should be) allocated
void(* ExecuteProgram)(struct prvm_prog_s *prog, func_t fnum, const char *errormessage)
pointer to one of the *VM_ExecuteProgram functions
qbool(* load_edict)(struct prvm_prog_s *prog, prvm_edict_t *ent)
[INIT] used by PRVM_ED_LoadFromFile
sizebuf_t tempstringsbuf
buffer for storing all tempstrings created during one invocation of ExecuteProgram
void(* init_cmd)(struct prvm_prog_s *prog)
[INIT] used by PRVM_InitProg
const char ** extensionstring
void(* end_increase_edicts)(struct prvm_prog_s *prog)
[INIT]
int reserved_edicts
number of reserved edicts (allocated from 1)
entity_render_t ** entities
renderable entities (excluding world)
viddef_mode_t mode
currently active video mode
viddef_t vid
global video state
void World_UnlinkAll(world_t *world)
unlinks all entities (used before reallocation of edicts)
void World_UnlinkEdict(prvm_edict_t *ent)
void World_Physics_RemoveJointFromEntity(world_t *world, struct prvm_edict_s *ed)
void World_Physics_RemoveFromEntity(world_t *world, struct prvm_edict_s *ed)
#define Mem_AllocPool(name, flags, parent)