int edict_size; // in bytes
int edictareasize; // LordHavoc: in bytes (for bound checking)
+ int *statement_linenums; // NULL if not available
+
union {
float *generic;
globalvars_t *server;
int maxknownstrings;
int numknownstrings;
+ // this is updated whenever a string is removed or added
+ // (simple optimization of the free string search)
+ int firstfreeknownstring;
const char **knownstrings;
+ qbyte *knownstrings_freeable;
+ const char ***stringshash;
// all memory allocations related to this vm_prog (code, edicts, strings)
mempool_t *progs_mempool; // [INIT]
float *time;
float _time;
+ // allow writing to world entity fields, this is set by server init and
+ // cleared before first server frame
+ qboolean allowworldwrites;
+
// name of the prog, e.g. "Server", "Client" or "Menu" (used for text output)
char *name; // [INIT]
const char *PRVM_GetString(int num);
int PRVM_SetEngineString(const char *s);
-int PRVM_AllocString(int bufferlength, char **pointer);
+int PRVM_AllocString(size_t bufferlength, char **pointer);
void PRVM_FreeString(int num);
//============================================================================
//#define PRVM_SAFENAME
#ifndef PRVM_SAFENAME
- #define PRVM_NAME (prog->name)
+# define PRVM_NAME (prog->name)
#else
- #define PRVM_NAME (prog->name ? prog->name : "Unknown prog name")
+# define PRVM_NAME (prog->name ? prog->name : "Unknown prog name")
#endif
// helper macro to make function pointer calls easier