Don't forget to apply the doppler adjustment factor to the listener velocity also

This commit is contained in:
ehofman
2009-11-23 11:54:33 +00:00
committed by Tim Moore
parent 406cdf8d16
commit 878288f06a

View File

@@ -277,6 +277,11 @@ if (isNaN(_velocity.data())) printf("NaN in listener velocity\n");
if ( _velocity[0] || _velocity[1] || _velocity[2] ) {
velocity = hlOr.backTransform(_velocity*SG_FEET_TO_METER);
}
if ( _bad_doppler ) {
velocity *= 100.0f;
}
alListenerfv( AL_VELOCITY, toVec3f(velocity).data() );
// alDopplerVelocity(340.3); // TODO: altitude dependent
testForALError("update");