remove some warnings for MSVC
don't start to play sounds that are out of range of the listener
This commit is contained in:
committed by
ThorstenB
parent
3f6f34e7e1
commit
aae77a7983
@@ -293,7 +293,7 @@ public:
|
||||
points.push_back(std::make_pair(randomPoint, img->getColor(x,y).r()));
|
||||
}
|
||||
} else {
|
||||
points.push_back(std::make_pair(randomPoint, mt_rand(&seed)));
|
||||
points.push_back(std::make_pair(randomPoint, static_cast<float>(mt_rand(&seed))));
|
||||
}
|
||||
}
|
||||
num -= 1.0;
|
||||
|
||||
@@ -134,7 +134,7 @@ void SGSampleGroup::update( double dt ) {
|
||||
for ( ; sample_current != sample_end; ++sample_current ) {
|
||||
SGSoundSample *sample = sample_current->second;
|
||||
|
||||
if ( !sample->is_valid_source() && sample->is_playing() ) {
|
||||
if ( !sample->is_valid_source() && sample->is_playing() && !sample->test_out_of_range()) {
|
||||
//
|
||||
// a request to start playing a sound has been filed.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user