Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-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) {