prevent division by zero, which spreads darkness during bounces
source of the problem is located somewhere else
This commit is contained in:
parent
e62c6f4bb3
commit
b2bc2077e5
|
|
@ -792,6 +792,12 @@ static bool MapTriangle( rawLightmap_t *lm, surfaceInfo_t *info, bspDrawVert_t *
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* this must not happen in the first place, but it does and spreads result of division by zero in MapSingleLuxel all over the map during -bounce */
|
||||||
|
if( lm->vecs != NULL && plane[lm->axisNum] == 0 ){
|
||||||
|
Sys_Warning( "plane[lm->axisNum] == 0\n" );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* check to see if we need to calculate texture->world tangent vectors */
|
/* check to see if we need to calculate texture->world tangent vectors */
|
||||||
if ( info->si->normalImage != NULL && CalcTangentVectors( 3, dv, stvStatic, ttvStatic ) ) {
|
if ( info->si->normalImage != NULL && CalcTangentVectors( 3, dv, stvStatic, ttvStatic ) ) {
|
||||||
stv = stvStatic;
|
stv = stvStatic;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user