]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - progs.h
got rid of leafnums array in edict structure for pvs checking, pvs is now checked...
[xonotic/darkplaces.git] / progs.h
diff --git a/progs.h b/progs.h
index f17adfd3474e6bfaa9405bff0f958ef3eeaca9fe..a77faafe8f0a60aa4cc506ce3ebb79dcfa1923c1 100644 (file)
--- a/progs.h
+++ b/progs.h
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 See the GNU General Public License for more details.
 
 
 See the GNU General Public License for more details.
 
@@ -29,21 +29,23 @@ typedef union eval_s
        func_t                  function;
        int                             _int;
        int                             edict;
        func_t                  function;
        int                             _int;
        int                             edict;
-} eval_t;      
+} eval_t;
 
 
-// LordHavoc: increased number of leafs per entity limit from 16 to 64
-#define        MAX_ENT_LEAFS   64
+typedef struct link_s
+{
+       struct link_s   *prev, *next;
+} link_t;
+
+// LordHavoc: increased number of leafs per entity limit from 16 to 256
+#define        MAX_ENT_LEAFS   256
 typedef struct edict_s
 {
        qboolean        free;
 typedef struct edict_s
 {
        qboolean        free;
-       link_t          area;                           // linked to a division node or leaf
-       
-       int                     num_leafs;
-       short           leafnums[MAX_ENT_LEAFS];
+       link_t          area;
 
        entity_state_t  baseline;
        entity_state_t  deltabaseline; // LordHavoc: previous frame
 
        entity_state_t  baseline;
        entity_state_t  deltabaseline; // LordHavoc: previous frame
-       
+
        float           freetime;                       // sv.time when the object was freed
        // LordHavoc: for MOVETYPE_STEP interpolation
        vec3_t          steporigin;
        float           freetime;                       // sv.time when the object was freed
        // LordHavoc: for MOVETYPE_STEP interpolation
        vec3_t          steporigin;
@@ -51,12 +53,11 @@ typedef struct edict_s
        vec3_t          stepoldorigin;
        vec3_t          stepoldangles;
        float           steplerptime;
        vec3_t          stepoldorigin;
        vec3_t          stepoldangles;
        float           steplerptime;
-       // LordHavoc: delta compression
-       float           nextfullupdate; // every second a full update is forced
        entvars_t       v;                                      // C exported fields from progs
 // other fields from progs come immediately after
 } edict_t;
        entvars_t       v;                                      // C exported fields from progs
 // other fields from progs come immediately after
 } edict_t;
-#define        EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
+//#define      EDICT_FROM_AREA(l) ((edict_t *)((byte *)l - (int)&(((edict_t *)0)->area)))
+//#define      EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
 
 // LordHavoc: in an effort to eliminate time wasted on GetEdictFieldValue...  see pr_edict.c for the functions which use these.
 extern int eval_gravity;
 
 // LordHavoc: in an effort to eliminate time wasted on GetEdictFieldValue...  see pr_edict.c for the functions which use these.
 extern int eval_gravity;
@@ -72,6 +73,8 @@ extern int eval_glow_color;
 extern int eval_items2;
 extern int eval_scale;
 extern int eval_alpha;
 extern int eval_items2;
 extern int eval_scale;
 extern int eval_alpha;
+extern int eval_renderamt; // HalfLife support
+extern int eval_rendermode; // HalfLife support
 extern int eval_fullbright;
 extern int eval_ammo_shells1;
 extern int eval_ammo_nails1;
 extern int eval_fullbright;
 extern int eval_ammo_shells1;
 extern int eval_ammo_nails1;
@@ -84,13 +87,20 @@ extern int eval_idealpitch;
 extern int eval_pitch_speed;
 extern int eval_viewmodelforclient;
 extern int eval_nodrawtoclient;
 extern int eval_pitch_speed;
 extern int eval_viewmodelforclient;
 extern int eval_nodrawtoclient;
+extern int eval_exteriormodeltoclient;
 extern int eval_drawonlytoclient;
 extern int eval_colormod;
 extern int eval_ping;
 extern int eval_movement;
 extern int eval_drawonlytoclient;
 extern int eval_colormod;
 extern int eval_ping;
 extern int eval_movement;
+extern int eval_pmodel;
+extern int eval_punchvector;
 
 #define GETEDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (eval_t*)((char*)&ed->v + fieldoffset) : NULL)
 
 
 #define GETEDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (eval_t*)((char*)&ed->v + fieldoffset) : NULL)
 
+
+extern dfunction_t *SV_PlayerPhysicsQC;
+extern dfunction_t *EndFrameQC;
+
 //============================================================================
 
 extern dprograms_t             *progs;
 //============================================================================
 
 extern dprograms_t             *progs;
@@ -109,7 +119,7 @@ extern      int                             pr_edictareasize; // LordHavoc: for bounds checking
 
 void PR_Init (void);
 
 
 void PR_Init (void);
 
-void PR_ExecuteProgram (func_t fnum);
+void PR_ExecuteProgram (func_t fnum, char *errormessage);
 void PR_LoadProgs (void);
 
 void PR_Profile_f (void);
 void PR_LoadProgs (void);
 
 void PR_Profile_f (void);
@@ -121,10 +131,10 @@ char      *ED_NewString (char *string);
 // returns a copy of the string allocated from the server's string heap
 
 void ED_Print (edict_t *ed);
 // returns a copy of the string allocated from the server's string heap
 
 void ED_Print (edict_t *ed);
-void ED_Write (FILE *f, edict_t *ed);
+void ED_Write (QFile *f, edict_t *ed);
 char *ED_ParseEdict (char *data, edict_t *ent);
 
 char *ED_ParseEdict (char *data, edict_t *ent);
 
-void ED_WriteGlobals (FILE *f);
+void ED_WriteGlobals (QFile *f);
 void ED_ParseGlobals (char *data);
 
 void ED_LoadFromFile (char *data);
 void ED_ParseGlobals (char *data);
 
 void ED_LoadFromFile (char *data);