aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/snd_openal.c
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-01-19 20:28:12 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-01-19 20:28:12 +0000
commita8e64aa86ac8122725ed6501a31701930d472fd9 (patch)
treeeceee3ea43c9c46f873dd57cf7e2ea456c210b25 /code/client/snd_openal.c
parent921cf4c9a7aa7cc588153be59c3514dd7db27b11 (diff)
downloadioquake3-aero-a8e64aa86ac8122725ed6501a31701930d472fd9.tar.gz
ioquake3-aero-a8e64aa86ac8122725ed6501a31701930d472fd9.zip
* Added Q_isnan for NaN tests with -ffast-math
* Fixed UT/OpenAL work around git-svn-id: svn://svn.icculus.org/quake3/trunk@510 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client/snd_openal.c')
-rw-r--r--code/client/snd_openal.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/code/client/snd_openal.c b/code/client/snd_openal.c
index 6923186..19ec33c 100644
--- a/code/client/snd_openal.c
+++ b/code/client/snd_openal.c
@@ -492,15 +492,12 @@ S_AL_SanitiseVector
#define S_AL_SanitiseVector(v) _S_AL_SanitiseVector(v,__LINE__)
static void _S_AL_SanitiseVector( vec3_t v, int line )
{
- // NaNs can't be compared for equality, thus always fail this test
- if( v[ 0 ] == v[ 0 ] &&
- v[ 1 ] == v[ 1 ] &&
- v[ 2 ] == v[ 2 ] )
- return;
-
- Com_DPrintf( S_COLOR_YELLOW "WARNING: vector with one or more NaN components "
- "being passed to OpenAL at %s:%d -- zeroing\n", __FILE__, line );
- VectorClear( v );
+ if( Q_isnan( v[ 0 ] ) || Q_isnan( v[ 1 ] ) || Q_isnan( v[ 2 ] ) )
+ {
+ Com_DPrintf( S_COLOR_YELLOW "WARNING: vector with one or more NaN components "
+ "being passed to OpenAL at %s:%d -- zeroing\n", __FILE__, line );
+ VectorClear( v );
+ }
}
/*