]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.h
reorganized SV_FlyMove to merge the two paths (new simple/old complex approaches)
[xonotic/darkplaces.git] / model_brush.h
index 08686dfe87d6e08d376872a7d37e3e53739768ae..62448da2c73079ba9acb6267e6f38187ae7b1f8e 100644 (file)
@@ -220,10 +220,16 @@ typedef struct msurface_s
        int poly_numverts;
        float *poly_verts;
 
+       // index into model->brush.shadowmesh
+       int num_firstshadowmeshtriangle;
+
        // neighboring surfaces (one per poly_numverts)
        //struct msurface_s **neighborsurfaces;
        // currently used only for generating static shadow volumes
        int lighttemp_castshadow;
+
+       // avoid redundent surface shadows
+       int shadowmark;
 }
 msurface_t;
 
@@ -275,9 +281,8 @@ typedef struct mleaf_s
        // used by polygon-through-portals visibility checker
        int portalmarkid;
 
-       // decompressed pvs bits (potentially visible set)
-       // note: never NULL, always present, may be full of 0xFF though
-       qbyte *pvsdata;
+       // -1 is not in pvs, >= 0 is pvs bit number
+       int clusterindex;
 
        int *firstmarksurface;
        int nummarksurfaces;
@@ -767,5 +772,8 @@ typedef struct
 }
 q3dpvs_t;
 
+#define CHECKPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] & (1 << ((b) & 7))) : false)
+#define SETPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] |= (1 << ((b) & 7))) : false)
+
 #endif