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>2008-07-17 23:10:05 +0000
committerStijn Buys <ingar@osirion.org>2008-07-17 23:10:05 +0000
commite7cd0386ce564a4ac1c6ba866afeda54e6e8d1d9 (patch)
tree5bef1af4a437e85e8b28e89ef10b237a14133062 /src/client
parentae65ef53fc8b70ebee3b43bb06ecd091aaae2a26 (diff)
spacedust, r_dust variable
Diffstat (limited to 'src/client')
-rw-r--r--src/client/view.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index 7038a47..56c692e 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -61,7 +61,7 @@ void init()
cl_crosshaircolor = core::Cvar::get("cl_crosshaircolor", "1 1 1", core::Cvar::Archive);
cl_crosshaircolor->set_info("[r g b] crosshairs color");
- snd_engines = core::Cvar::get("snd_engines", "0", core::Cvar::Archive);
+ snd_engines = core::Cvar::get("snd_engines", "1", core::Cvar::Archive);
snd_engines->set_info("[bool] enable or disable engine sounds");
}
@@ -294,12 +294,13 @@ void render_sound()
if (!(snd_engines && snd_engines->value()))
return;
- float speed = 0;
+ math::Vector3f velocity(0, 0 ,0);
+
if (core::localcontrol()) {
- speed = core::localcontrol()->speed();
+ velocity.assign(core::localcontrol()->state()->axis().forward() * core::localcontrol()->speed());
}
- audio::update_listener(render::Camera::eye(), render::Camera::axis(), speed);
+ audio::update_listener(render::Camera::eye(), render::Camera::axis(), velocity);
for (std::map<unsigned int, core::Entity *>::iterator it=core::Entity::registry.begin(); it != core::Entity::registry.end(); it++) {
core::Entity *entity = (*it).second;