From d237d6783277692011999609cef4a60d7f1d9888 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 28 Jul 2016 21:18:34 +0200 Subject: Fixed the snd_engines cvar being ignored. --- src/client/soundext.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/client') 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) { -- cgit v1.2.3