remove some warnings for MSVC

don't start to play sounds that are out of range of the listener
This commit is contained in:
Harald JOHNSEN
2012-05-29 19:59:54 +02:00
committed by ThorstenB
parent 3f6f34e7e1
commit aae77a7983
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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.
//