[q3map2] Avoid division by zero (remove removable singularity)

This commit is contained in:
Thomas Köppe 2018-02-23 14:10:01 +00:00
parent 79605bbc69
commit d19e3dd7a8

View file

@ -1052,9 +1052,13 @@ static void ParseRawBrush( qboolean onlyLights ){
/* ydnar: gs mods: bias texture shift */
if ( si->globalTexture == qfalse ) {
if ( si->shaderWidth > 0 ) {
shift[ 0 ] -= ( floor( shift[ 0 ] / si->shaderWidth ) * si->shaderWidth );
}
if ( si->shaderHeight ) {
shift[ 1 ] -= ( floor( shift[ 1 ] / si->shaderHeight ) * si->shaderHeight );
}
}
/*
historically, there are 3 integer values at the end of a brushside line in a .map file.