Don't say cubemap is outside lightgrid 6 times

This commit is contained in:
Zack Middleton 2014-03-10 16:12:14 -05:00
parent b98e6d5cc0
commit 5a3e10d716

View file

@ -2863,7 +2863,8 @@ void R_RenderCubemapSide( int cubemapIndex, int cubemapSide, qboolean subscene )
vec3_t ambient, directed, lightDir;
R_LightForPoint(tr.refdef.vieworg, ambient, directed, lightDir);
tr.refdef.colorScale = 766.0f / (directed[0] + directed[1] + directed[2] + 1.0f);
if (directed[0] + directed[1] + directed[2] == 0)
// only print message for first side
if (directed[0] + directed[1] + directed[2] == 0 && cubemapSide == 0)
{
ri.Printf(PRINT_ALL, "cubemap %d (%f, %f, %f) is outside the lightgrid!\n", cubemapIndex, tr.refdef.vieworg[0], tr.refdef.vieworg[1], tr.refdef.vieworg[2]);
}
@ -2910,4 +2911,4 @@ void R_RenderCubemapSide( int cubemapIndex, int cubemapSide, qboolean subscene )
{
RE_EndScene();
}
}
}