]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/decals.c
Merge branch 'smooth' into 'master'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / decals.c
index cd5525c7266143d1621a16cefee755a5062c29d2..f7471c96ccea19869331abff927a067d81371b6f 100644 (file)
@@ -337,7 +337,7 @@ static int MakeDecalProjector( shaderInfo_t *si, vec4_t projection, float distan
 
        /* limit check */
        if ( numProjectors >= MAX_PROJECTORS ) {
-               Sys_Printf( "WARNING: MAX_PROJECTORS (%d) exceeded, no more decal projectors available.\n", MAX_PROJECTORS );
+               Sys_FPrintf( SYS_WRN, "WARNING: MAX_PROJECTORS (%d) exceeded, no more decal projectors available.\n", MAX_PROJECTORS );
                return -2;
        }
 
@@ -431,7 +431,7 @@ void ProcessDecals( void ){
 
                /* any patches? */
                if ( e->patches == NULL ) {
-                       Sys_Printf( "WARNING: Decal entity without any patch meshes, ignoring.\n" );
+                       Sys_FPrintf( SYS_WRN, "WARNING: Decal entity without any patch meshes, ignoring.\n" );
                        e->epairs = NULL;   /* fixme: leak! */
                        continue;
                }
@@ -442,7 +442,7 @@ void ProcessDecals( void ){
 
                /* no target? */
                if ( e2 == NULL ) {
-                       Sys_Printf( "WARNING: Decal entity without a valid target, ignoring.\n" );
+                       Sys_FPrintf( SYS_WRN, "WARNING: Decal entity without a valid target, ignoring.\n" );
                        continue;
                }
 
@@ -583,7 +583,7 @@ static void ProjectDecalOntoWinding( decalProjector_t *dp, mapDrawSurface_t *ds,
        for ( i = 0; i < dp->numPlanes; i++ )
        {
                /* chop winding by the plane */
-               ClipWindingEpsilon( w, dp->planes[ i ], dp->planes[ i ][ 3 ], 0.0625f, &front, &back );
+               ClipWindingEpsilonStrict( w, dp->planes[ i ], dp->planes[ i ][ 3 ], 0.0625f, &front, &back ); /* strict, if identical plane we don't want to keep it */
                FreeWinding( w );
 
                /* lose the front fragment */
@@ -618,6 +618,7 @@ static void ProjectDecalOntoWinding( decalProjector_t *dp, mapDrawSurface_t *ds,
        ds2->shaderInfo = dp->si;
        ds2->fogNum = ds->fogNum;   /* why was this -1? */
        ds2->lightmapScale = ds->lightmapScale;
+       ds2->shadeAngleDegrees = ds->shadeAngleDegrees;
        ds2->numVerts = w->numpoints;
        ds2->verts = safe_malloc( ds2->numVerts * sizeof( *ds2->verts ) );
        memset( ds2->verts, 0, ds2->numVerts * sizeof( *ds2->verts ) );