diff options
author | Stijn Buys <ingar@osirion.org> | 2010-02-25 19:28:14 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-02-25 19:28:14 +0000 |
commit | 90fbc4c5caf5afd54920894319448b74967399ba (patch) | |
tree | d4a8fe5ccdcbe94f4a3e5e1115f5baed26e8c2e3 /src/client/targets.cc | |
parent | 83757353860fa447c36d4078602efea36d7da94e (diff) |
added initial support for model sound tags,
moved sound code from client/targets.cc to client/soundext.cc,
added master volume cvar snd_volume
Diffstat (limited to 'src/client/targets.cc')
-rw-r--r-- | src/client/targets.cc | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/client/targets.cc b/src/client/targets.cc index cd3db41..d915f20 100644 --- a/src/client/targets.cc +++ b/src/client/targets.cc @@ -39,7 +39,6 @@ unsigned int current_target_id = 0; unsigned int current_hover = 0; core::Entity *current_target = 0; -core::Cvar *snd_engines = 0; bool is_valid_hud_target(core::Entity *entity) { @@ -263,9 +262,6 @@ void reset() void init() { - snd_engines = core::Cvar::get("snd_engines", "1", core::Cvar::Archive); - snd_engines->set_info("[bool] enable or disable engine sounds"); - core::Func *func = 0; func = core::Func::add("target_next", func_target_next); @@ -293,41 +289,6 @@ void shutdown() core::Func::remove("target_center"); } -void render_listener_sound() -{ - if (!(snd_engines && snd_engines->value())) - return; - - math::Vector3f velocity(0, 0 , 0); - if (core::localcontrol()) { - velocity.assign(core::localcontrol()->axis().forward() * core::localcontrol()->speed()); - } - - audio::update_listener(render::Camera::eye(), render::Camera::axis(), velocity); -} - -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) && !ext_render(entity)->visible())) { - if (ext_sound(entity)) - delete ext_sound(entity); - return; - } else { - if (!ext_sound(entity)) { - new SoundExt(entity); - } - - ext_sound(entity)->frame(0.0f); - } -} - - // render targets and sounds (in world coordinates) void frame() { |