Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2016-07-28 21:18:34 +0200
committerStijn Buys <ingar@osirion.org>2016-07-28 21:18:34 +0200
commitd237d6783277692011999609cef4a60d7f1d9888 (patch)
treee93e88b415d12be827a128ca057f4a568abfaa74
parent5de756948709c153894d6b13b5bbc62e722e4149 (diff)
Fixed the snd_engines cvar being ignored.
-rw-r--r--src/client/soundext.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/client/soundext.cc b/src/client/soundext.cc
index 9de548b..0b7649e 100644
--- a/src/client/soundext.cc
+++ b/src/client/soundext.cc
@@ -50,12 +50,6 @@ void render_listener_sound()
void render_entity_sound(core::Entity *entity)
{
- if (!(snd_engines && snd_engines->value())) {
- if (ext_sound(entity))
- delete ext_sound(entity);
- return;
- }
-
if (!ext_render(entity) || (ext_render(entity)->distance() > core::range::fxdistance)) {
if (ext_sound(entity))
delete ext_sound(entity);
@@ -228,10 +222,10 @@ void SoundExt::frame(float elapsed)
if (controlable->state() == core::Entity::Impulse) {
pitch = 1.0f;
- gain = 1.0f;
+ gain = (snd_engines ? snd_engines->value() : 0.0f);
} else {
pitch = 0.2f + controlable->thrust() * 0.8f;
- gain = 1.0f;
+ gain = (snd_engines ? snd_engines->value() : 0.0f);
}
if (controlable->state() == core::Entity::ImpulseInitiate) {