remove version check
This commit is contained in:
parent
9dde41204f
commit
20eb1bbfba
1 changed files with 1 additions and 8 deletions
|
|
@ -123,14 +123,7 @@ static void SetSoundPosition(Camera listener, Sound sound, Vector3 position, flo
|
||||||
if (dotProduct < 0.0f) attenuation *= (1.0f + dotProduct*0.5f);
|
if (dotProduct < 0.0f) attenuation *= (1.0f + dotProduct*0.5f);
|
||||||
|
|
||||||
// Set stereo panning based on sound position relative to listener
|
// Set stereo panning based on sound position relative to listener
|
||||||
float pan = 0;
|
float pan = Vector3DotProduct(normalizedDirection, right);
|
||||||
if (RAYLIB_VERSION_MAJOR >= 6) {
|
|
||||||
// -1.0 - 1.0
|
|
||||||
pan = Vector3DotProduct(normalizedDirection, right);
|
|
||||||
} else {
|
|
||||||
// 0.0 - 1.0
|
|
||||||
pan = 0.5f + 0.5f*Vector3DotProduct(normalizedDirection, right);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply final sound properties
|
// Apply final sound properties
|
||||||
SetSoundVolume(sound, attenuation);
|
SetSoundVolume(sound, attenuation);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue