mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 12:01:10 +00:00
Merge pull request #599 from tkoeppe/divzero
[q3map2] Avoid division by zero (remove removable singularity)
This commit is contained in:
commit
b48cf2679d
1 changed files with 6 additions and 2 deletions
|
@ -1052,9 +1052,13 @@ static void ParseRawBrush( qboolean onlyLights ){
|
||||||
|
|
||||||
/* ydnar: gs mods: bias texture shift */
|
/* ydnar: gs mods: bias texture shift */
|
||||||
if ( si->globalTexture == qfalse ) {
|
if ( si->globalTexture == qfalse ) {
|
||||||
|
if ( si->shaderWidth > 0 ) {
|
||||||
shift[ 0 ] -= ( floor( shift[ 0 ] / si->shaderWidth ) * si->shaderWidth );
|
shift[ 0 ] -= ( floor( shift[ 0 ] / si->shaderWidth ) * si->shaderWidth );
|
||||||
|
}
|
||||||
|
if ( si->shaderHeight ) {
|
||||||
shift[ 1 ] -= ( floor( shift[ 1 ] / si->shaderHeight ) * 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.
|
historically, there are 3 integer values at the end of a brushside line in a .map file.
|
||||||
|
|
Loading…
Reference in a new issue