vmap: Add _entcontentflags, which like _entsurfaceflags controls content flags on a per brush-entity basis
This commit is contained in:
parent
f0c0c4f4a4
commit
9df6ec6305
3 changed files with 9 additions and 2 deletions
|
@ -1655,7 +1655,7 @@ static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups )
|
||||||
const char *classname, *value;
|
const char *classname, *value;
|
||||||
float lightmapScale, shadeAngle;
|
float lightmapScale, shadeAngle;
|
||||||
int lightmapSampleSize;
|
int lightmapSampleSize;
|
||||||
int entSurfFlag;
|
int entSurfFlag, entContFlag;
|
||||||
char shader[ MAX_QPATH ];
|
char shader[ MAX_QPATH ];
|
||||||
shaderInfo_t *celShader = NULL;
|
shaderInfo_t *celShader = NULL;
|
||||||
brush_t *brush;
|
brush_t *brush;
|
||||||
|
@ -1836,6 +1836,9 @@ static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups )
|
||||||
entSurfFlag = 0;
|
entSurfFlag = 0;
|
||||||
entSurfFlag = IntForKey( mapEnt, "_entsurfaceflags");
|
entSurfFlag = IntForKey( mapEnt, "_entsurfaceflags");
|
||||||
|
|
||||||
|
entContFlag = 0;
|
||||||
|
entContFlag = IntForKey( mapEnt, "_entcontentflags");
|
||||||
|
|
||||||
/* ydnar: get cel shader :) for this entity */
|
/* ydnar: get cel shader :) for this entity */
|
||||||
value = ValueForKey( mapEnt, "_celshader" );
|
value = ValueForKey( mapEnt, "_celshader" );
|
||||||
if ( value[ 0 ] == '\0' ) {
|
if ( value[ 0 ] == '\0' ) {
|
||||||
|
@ -1908,6 +1911,7 @@ static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups )
|
||||||
brush->celShader = celShader;
|
brush->celShader = celShader;
|
||||||
brush->shadeAngleDegrees = shadeAngle;
|
brush->shadeAngleDegrees = shadeAngle;
|
||||||
brush->entSurfaceFlags = entSurfFlag;
|
brush->entSurfaceFlags = entSurfFlag;
|
||||||
|
brush->entContentFlags = entContFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( patch = mapEnt->patches; patch != NULL; patch = patch->next )
|
for ( patch = mapEnt->patches; patch != NULL; patch = patch->next )
|
||||||
|
@ -1919,6 +1923,7 @@ static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups )
|
||||||
patch->lightmapScale = lightmapScale;
|
patch->lightmapScale = lightmapScale;
|
||||||
patch->celShader = celShader;
|
patch->celShader = celShader;
|
||||||
patch->entSurfaceFlags = entSurfFlag;
|
patch->entSurfaceFlags = entSurfFlag;
|
||||||
|
patch->entContentFlags = entContFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar: gs mods: set entity bounds */
|
/* ydnar: gs mods: set entity bounds */
|
||||||
|
|
|
@ -900,6 +900,7 @@ typedef struct brush_s
|
||||||
qboolean detail;
|
qboolean detail;
|
||||||
qboolean opaque;
|
qboolean opaque;
|
||||||
int entSurfaceFlags;
|
int entSurfaceFlags;
|
||||||
|
int entContentFlags;
|
||||||
|
|
||||||
int portalareas[ 2 ];
|
int portalareas[ 2 ];
|
||||||
|
|
||||||
|
@ -961,6 +962,7 @@ typedef struct parseMesh_s
|
||||||
int maxIterations;
|
int maxIterations;
|
||||||
qboolean nosolid;
|
qboolean nosolid;
|
||||||
int entSurfaceFlags;
|
int entSurfaceFlags;
|
||||||
|
int entContentFlags;
|
||||||
}
|
}
|
||||||
parseMesh_t;
|
parseMesh_t;
|
||||||
|
|
||||||
|
|
|
@ -459,7 +459,7 @@ void EmitBrushes( brush_t *brushes, int *firstBrush, int *numBrushes ){
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaceFlags = b->contentShader->surfaceFlags | b->entSurfaceFlags;
|
surfaceFlags = b->contentShader->surfaceFlags | b->entSurfaceFlags;
|
||||||
contentFlags = b->contentShader->contentFlags;
|
contentFlags = b->contentShader->contentFlags | b->entContentFlags;
|
||||||
|
|
||||||
if (b->nosolid) {
|
if (b->nosolid) {
|
||||||
contentFlags &= ~1;
|
contentFlags &= ~1;
|
||||||
|
|
Loading…
Reference in a new issue