From 162a078ee99efa4236b77c05ba2b5603b499023f Mon Sep 17 00:00:00 2001 From: drian Date: Mon, 8 Mar 2021 16:31:37 +0100 Subject: [PATCH] made al_referencedistance and al_rollofffactor unconfigurable to prevent players getting an unfair advantage --- config/docs.cfg | 4 ---- source/src/openal.cpp | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/config/docs.cfg b/config/docs.cfg index 22f1ddab..58f03766 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -3306,10 +3306,6 @@ docref [waterlevel]; docident [waveheight] [Sets the wave height of water, between 0 (completely still, no waves at all) and 1 (very choppy).]; docargument [F] [wave height (floating-point value)] [min 0/max 1/default 0.3]; docsection [Sound] -docident [al_referencedistance] [The distance from the source emitting the sound to the listener.]; -docargument [V] [] [min 0/max 1000000/default 400]; -docident [al_rollofffactor] [This value indicates the relative "strength" of a sound (how far away the sound can be heard).]; -docargument [V] [] [min 0/max 1000000/default 100]; docident [audio] [Enables or disables the audio subsystem in AC.]; docargument [B] [enable] [min 0/max 1/default 1]; docident [audiodebug] [Enables verbose output for debugging purposes.]; diff --git a/source/src/openal.cpp b/source/src/openal.cpp index b309d553..65e2ab77 100644 --- a/source/src/openal.cpp +++ b/source/src/openal.cpp @@ -4,8 +4,8 @@ #define DEBUGCOND (audiodebug==1) -VAR(al_referencedistance, 0, 400, 1000000); -VAR(al_rollofffactor, 0, 100, 1000000); +int al_referencedistance = 400; // The distance from the source emitting the sound to the listener +int al_rollofffactor = 100; // This value indicates the relative "strength" of a sound (how far away the sound can be heard) // represents an OpenAL source, an audio emitter in the 3D world