]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - progs.h
-Added the cvar sv_progs, which allows you to set the name of the server
[xonotic/darkplaces.git] / progs.h
diff --git a/progs.h b/progs.h
index e1e365c4166c9b70454375585277777783666e98..cdae2523cc26b9c59913ae88313c9a5777049c9c 100644 (file)
--- a/progs.h
+++ b/progs.h
@@ -57,13 +57,9 @@ typedef struct edict_engineprivate_s
        // we should avoid extensive checking on entities already encountered
        int areagridmarknumber;
 
-       // old entity protocol, not used
-#ifdef QUAKEENTITIES
+       // PROTOCOL_QUAKE
        // baseline values
        entity_state_t baseline;
-       // LordHavoc: previous frame
-       entity_state_t deltabaseline;
-#endif
 
        // LordHavoc: gross hack to make floating items still work
        int suspendedinairflag;
@@ -93,6 +89,8 @@ extern int eval_button5;
 extern int eval_button6;
 extern int eval_button7;
 extern int eval_button8;
+extern int eval_buttonuse;
+extern int eval_buttonchat;
 extern int eval_glow_size;
 extern int eval_glow_trail;
 extern int eval_glow_color;
@@ -127,6 +125,14 @@ extern int eval_light_lev;
 extern int eval_color;
 extern int eval_style;
 extern int eval_pflags;
+extern int eval_cursor_active;
+extern int eval_cursor_screen;
+extern int eval_cursor_trace_start;
+extern int eval_cursor_trace_endpos;
+extern int eval_cursor_trace_ent;
+extern int eval_colormod;
+extern int eval_playermodel;
+extern int eval_playerskin;
 
 #define GETEDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (eval_t *)((qbyte *)ed->v + fieldoffset) : NULL)
 
@@ -155,7 +161,7 @@ extern      int                             pr_edictareasize; // LordHavoc: for bounds checking
 void PR_Init (void);
 
 void PR_ExecuteProgram (func_t fnum, const char *errormessage);
-void PR_LoadProgs (void);
+void PR_LoadProgs (const char *progsname);
 
 void PR_Profile_f (void);
 
@@ -171,7 +177,7 @@ void ED_ClearEdict (edict_t *e);
 char   *ED_NewString (const char *string);
 // returns a copy of the string allocated from the server's string heap
 
-void ED_Print (edict_t *ed);
+void ED_Print(edict_t *ed);
 void ED_Write (qfile_t *f, edict_t *ed);
 const char *ED_ParseEdict (const char *data, edict_t *ent);
 
@@ -182,9 +188,10 @@ void ED_LoadFromFile (const char *data);
 
 edict_t *EDICT_NUM_ERROR(int n, char *filename, int fileline);
 #define EDICT_NUM(n) (((n) >= 0 && (n) < sv.max_edicts) ? sv.edicts + (n) : EDICT_NUM_ERROR(n, __FILE__, __LINE__))
+#define EDICT_NUM_UNSIGNED(n) (((n) < sv.max_edicts) ? sv.edicts + (n) : EDICT_NUM_ERROR(n, __FILE__, __LINE__))
 
 //int NUM_FOR_EDICT_ERROR(edict_t *e);
-#define NUM_FOR_EDICT(e) ((edict_t *)(e) - sv.edicts)
+#define NUM_FOR_EDICT(e) ((int)((edict_t *)(e) - sv.edicts))
 //int NUM_FOR_EDICT(edict_t *e);
 
 #define        NEXT_EDICT(e) ((e) + 1)
@@ -230,7 +237,7 @@ void ED_PrintEdicts (void);
 void ED_PrintNum (int ent);
 
 #define PR_GetString(num) (pr_strings + num) 
-#define PR_SetString(s)   ((int) (s) ? (s - pr_strings) : 0)
+#define PR_SetString(s)   ((s) != NULL ? (int) (s - pr_strings) : 0)
 
 #endif