// normalized). The original SnapNormal() didn't snap such vectors - it
// only snapped vectors that were near a perfect axis.
- //adjusting vectors, that were near a perfect axis, with bigger epsilon
+ //adjusting vectors, that are near perfect axis, with bigger epsilon
//they cause precision errors
- /*
+
if ( ( normal[0] != 0.0 || normal[1] != 0.0 ) && fabs(normal[0]) < 0.00025 && fabs(normal[1]) < 0.00025){
normal[0] = normal[1] = 0.0;
adjusted = qtrue;
normal[2] = normal[1] = 0.0;
adjusted = qtrue;
}
- */
+
/*
for ( i=0; i<30; i++ )
//% mixed = qfalse;
/* get the content/compile flags for every side in the brush */
- for ( i = 1; i < b->numsides; i++, s++ )
+ //for ( i = 1; i < b->numsides; i++, s++ )
+ for ( i = 1; i < b->numsides; i++ )
{
s = &b->sides[ i ];
if ( s->shaderInfo == NULL ) {
contentFlags |= s->contentFlags;
compileFlags |= s->compileFlags;
+
+ /* resolve inconsistency, when brush content was determined by 1st face */
+ if ( b->contentShader->compileFlags & C_LIQUID ){
+ continue;
+ }
+ else if ( s->compileFlags & C_LIQUID ){
+ b->contentShader = s->shaderInfo;
+ }
+ else if ( b->contentShader->compileFlags & C_FOG ){
+ continue;
+ }
+ else if ( s->compileFlags & C_FOG ){
+ b->contentShader = s->shaderInfo;
+ }
+ //playerclip
+ else if ( b->contentShader->contentFlags & 0x10000 ){
+ continue;
+ }
+ else if ( s->contentFlags & 0x10000 ){
+ b->contentShader = s->shaderInfo;
+ }
+ else if (!( b->contentShader->compileFlags & C_SOLID )){
+ continue;
+ }
+ else if (!( s->compileFlags & C_SOLID )){
+ b->contentShader = s->shaderInfo;
+ }
}
/* ydnar: getting rid of this stupid warning */