dungeon_crawler

diff prototype/src/level.cc @ 51:d57df51f6b50

- fixed audio panning (listener direction) - particles had no fog - sound sources were not destroyed properly
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 18 Sep 2012 09:40:56 +0300
parents c40efa9cf844
children 0d4061b1e6a1
line diff
     1.1 --- a/prototype/src/level.cc	Tue Sep 18 04:45:46 2012 +0300
     1.2 +++ b/prototype/src/level.cc	Tue Sep 18 09:40:56 2012 +0300
     1.3 @@ -98,9 +98,14 @@
     1.4  			std::list<Tile::AudioSourceDesc> asrc = cell->get_audio_sources();
     1.5  			for(auto sdesc : asrc) {
     1.6  				if(sdesc.dirmask & adjmask) {
     1.7 +					Vector3 pos = sdesc.pos + get_cell_pos(j, i);
     1.8 +
     1.9  					AudioSource *s = new AudioSource;
    1.10  					s->set_sample(sdesc.sample);
    1.11 -					s->set_position(sdesc.pos + get_cell_pos(i, y));
    1.12 +					s->set_position(pos);
    1.13 +					s->set_volume(sdesc.volume);
    1.14 +					s->set_reference_dist(sdesc.ref_dist);
    1.15 +					//s->set_rolloff(1.0);
    1.16  					austatic.add_source(s);
    1.17  				}
    1.18  			}