]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - protocol.h
added EF_DOUBLESIDED (and internally RENDER_NOCULLFACE)
[xonotic/darkplaces.git] / protocol.h
index 4adda06add3c210201189db34155974bcccd399d..0b566fbbba975b248d81bec6d0bbe500393b5b2b 100644 (file)
@@ -58,6 +58,7 @@ void Protocol_Names(char *buffer, size_t buffersize);
 #define EF_NOSHADOW                            4096    // LordHavoc: does not cast a shadow
 #define EF_NODEPTHTEST                 8192    // LordHavoc: shows through walls
 #define EF_SELECTABLE                  16384   // LordHavoc: highlights when PRYDON_CLIENTCURSOR mouse is over it
+#define EF_DOUBLESIDED                 32768   //[515]: disable cull face for this entity
 
 #define EF_STEP                                        0x80000000 // internal client use only - present on MOVETYPE_STEP entities, not QC accessible (too many bits)
 
@@ -315,9 +316,10 @@ void Protocol_Names(char *buffer, size_t buffersize);
 #define RENDER_SHADOW 65536 // cast shadow
 #define RENDER_LIGHT 131072 // receive light
 #define RENDER_TRANSPARENT 262144 // can't light during opaque stage
+#define RENDER_NOCULLFACE 524288 // render as double sided (disable GL_CULL_FACE)
 
 // this is 80 bytes
-typedef struct
+typedef struct entity_state_s
 {
        // ! means this is not sent to client
        double time; // ! time this state was built (used on client for interpolation)
@@ -418,7 +420,7 @@ the Write function performs these steps:
 server updates entities in looping ranges, a frame consists of a range of visible entities (not always all visible entities),
 */
 
-typedef struct
+typedef struct entity_frameinfo_s
 {
        double time;
        int framenum;
@@ -430,7 +432,7 @@ entity_frameinfo_t;
 #define MAX_ENTITY_HISTORY 64
 #define MAX_ENTITY_DATABASE (MAX_EDICTS * 2)
 
-typedef struct
+typedef struct entityframe_database_s
 {
        // note: these can be far out of range, modulo with MAX_ENTITY_DATABASE to get a valid range (which may wrap)
        // start and end of used area, when adding a new update to database, store at endpos, and increment endpos
@@ -455,7 +457,7 @@ typedef struct
 entityframe_database_t;
 
 // build entity data in this, to pass to entity read/write functions
-typedef struct
+typedef struct entity_frame_s
 {
        double time;
        int framenum;
@@ -694,7 +696,7 @@ typedef struct entityframe5_packetlog_s
        int packetnumber;
        int numstates;
        entityframe5_changestate_t states[ENTITYFRAME5_MAXSTATES];
-       qbyte statsdeltabits[(MAX_CL_STATS+7)/8];
+       unsigned char statsdeltabits[(MAX_CL_STATS+7)/8];
 }
 entityframe5_packetlog_t;
 
@@ -715,7 +717,7 @@ typedef struct entityframe5_database_s
        int *deltabits; // [maxedicts]
        // priorities of entities (updated whenever deltabits change)
        // (derived from deltabits)
-       qbyte *priorities; // [maxedicts]
+       unsigned char *priorities; // [maxedicts]
        // last frame this entity was sent on, for prioritzation
        int *updateframenum; // [maxedicts]
 
@@ -724,10 +726,10 @@ typedef struct entityframe5_database_s
        // which entities are currently active
        // (duplicate of the active bit of every state in states[])
        // (derived from states)
-       qbyte *visiblebits; // [(maxedicts+7)/8]
+       unsigned char *visiblebits; // [(maxedicts+7)/8]
 
        // delta compression of stats
-       qbyte statsdeltabits[(MAX_CL_STATS+7)/8];
+       unsigned char statsdeltabits[(MAX_CL_STATS+7)/8];
        int stats[MAX_CL_STATS];
 
        // old notes