mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
[q3map2] Avoid division by zero (remove removable singularity)
This commit is contained in:
parent
79605bbc69
commit
d19e3dd7a8
1 changed files with 6 additions and 2 deletions
|
@ -1052,8 +1052,12 @@ 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 ) {
|
||||||
shift[ 0 ] -= ( floor( shift[ 0 ] / si->shaderWidth ) * si->shaderWidth );
|
if ( si->shaderWidth > 0 ) {
|
||||||
shift[ 1 ] -= ( floor( shift[ 1 ] / si->shaderHeight ) * si->shaderHeight );
|
shift[ 0 ] -= ( floor( shift[ 0 ] / si->shaderWidth ) * si->shaderWidth );
|
||||||
|
}
|
||||||
|
if ( si->shaderHeight ) {
|
||||||
|
shift[ 1 ] -= ( floor( shift[ 1 ] / si->shaderHeight ) * si->shaderHeight );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue