Skip to content
Browse files

allo conditionally setting the Various listener attributes by passing…

… nulls
  • Loading branch information...
1 parent b35e850 commit 9a31a8654dc88325b799aaf76b9465df61c8ac99 @urkle urkle committed Nov 29, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 sources/OAL_Playback.cpp
View
6 sources/OAL_Playback.cpp
@@ -279,9 +279,9 @@ void OAL_Source_SetPositionRelative ( const int alSource, const bool abRelative
void OAL_Listener_SetAttributes ( const float* apPos, const float* apVel, const float* apForward, const float* apUp )
{
if (gpDevice == NULL) return;
- gpDevice->SetListenerPosition(apPos);
- gpDevice->SetListenerVelocity(apVel);
- gpDevice->SetListenerOrientation(apForward, apUp);
+ if (apPos) gpDevice->SetListenerPosition(apPos);
+ if (apVel) gpDevice->SetListenerVelocity(apVel);
+ if (apForward && apUp) gpDevice->SetListenerOrientation(apForward, apUp);
}
///////////////////////////////////////////////////////////

0 comments on commit 9a31a86

Please sign in to comment.
Something went wrong with that request. Please try again.