diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 1 | ||||
-rw-r--r-- | Alc/ALu.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -561,6 +561,7 @@ static ALvoid InitContext(ALCcontext *pContext) //Set globals pContext->DistanceModel = AL_INVERSE_DISTANCE_CLAMPED; + pContext->SourceDistanceModel = AL_FALSE; pContext->DopplerFactor = 1.0f; pContext->DopplerVelocity = 1.0f; pContext->flSpeedOfSound = SPEEDOFSOUNDMETRESPERSEC; @@ -589,7 +589,8 @@ static ALvoid CalcSourceParams(const ALCcontext *ALContext, ALsource *ALSource, RoomRolloff[i] += ALSource->Send[i].Slot->effect.Reverb.RoomRolloffFactor; } - switch(ALSource->DistanceModel) + switch(ALContext->SourceDistanceModel ? ALSource->DistanceModel : + ALContext->DistanceModel) { case AL_INVERSE_DISTANCE_CLAMPED: Distance=__max(Distance,MinDist); |