mirror of
https://github.com/UberGames/ioef.git
synced 2025-05-31 01:11:01 +00:00
* Added Q_isnan for NaN tests with -ffast-math
* Fixed UT/OpenAL work around
This commit is contained in:
parent
73e4d33d3b
commit
58c8175024
3 changed files with 27 additions and 9 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue