diff options
author | Stijn Buys <ingar@osirion.org> | 2008-11-23 12:34:07 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-11-23 12:34:07 +0000 |
commit | 583ec3285c41e9d253c4aaabd2af4dadac75f3a7 (patch) | |
tree | 5ec345e44af9d3699a95f493d8358ee766e23330 /src/client/soundext.cc | |
parent | 44158ccfbe943b832c0e0bf9ce547212aa6c2b8b (diff) |
clean module consturction/destruction
Diffstat (limited to 'src/client/soundext.cc')
-rw-r--r-- | src/client/soundext.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/soundext.cc b/src/client/soundext.cc index 421575d..9b15597 100644 --- a/src/client/soundext.cc +++ b/src/client/soundext.cc @@ -134,11 +134,15 @@ void SoundExt::frame(float elapsed) } + float x = entity->radius(); + if (entity->model()) + x = entity->model()->maxbbox().x; + audio::update_source(state_engineloopsource, - entity->location() - entity->axis().forward() * entity->model()->maxbbox().x , entity->axis().forward() * speed, pitch, gain); + entity->location() - entity->axis().forward() * x , entity->axis().forward() * speed, pitch, gain); audio::update_source(state_engineeventsource, - entity->location() - entity->axis().forward() * entity->model()->maxbbox().x , entity->axis().forward() * speed); + entity->location() - entity->axis().forward() * x , entity->axis().forward() * speed); } |