mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 00:09:18 +02:00
sound changes
This commit is contained in:
@@ -348,9 +348,11 @@ sound& sound::position(Math3D::vector3 const &pos)
|
||||
|
||||
sound& sound::dist(float dist)
|
||||
{
|
||||
alSourcef(id, AL_MAX_DISTANCE, dist);
|
||||
alSourcef(id, AL_REFERENCE_DISTANCE, dist / 3.82f);
|
||||
max_dist = dist * 1.5f;
|
||||
max_dist = dist * 2.0f;
|
||||
float half_dist = dist / 3.82f;
|
||||
alSourcef(id, AL_REFERENCE_DISTANCE, half_dist / 1.32f);
|
||||
alSourcef(id, AL_ROLLOFF_FACTOR, 3.0f);
|
||||
alSourcef(id, AL_MAX_DISTANCE, max_dist);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user