small fixes
This commit is contained in:
@@ -755,8 +755,8 @@ void SGEnviro::drawLightning(void) {
|
||||
ay = sin(course) * dist;
|
||||
SGSharedPtr<SGSoundSample> snd = sampleGroup->find("thunder");
|
||||
if( snd ) {
|
||||
SGVec3f pos = SGVec3f(ax, ay, -sgEnviro.last_alt);
|
||||
snd->set_relative_position(pos);
|
||||
SGVec3d pos = SGVec3d(ax, ay, -sgEnviro.last_alt);
|
||||
snd->set_position(pos);
|
||||
snd->play_once();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ void SGSampleGroup::update( double dt ) {
|
||||
}
|
||||
|
||||
// Update the position and orientation information for all samples.
|
||||
if ( _changed ) {
|
||||
if ( _changed || _smgr->has_changed() ) {
|
||||
update_pos_and_orientation();
|
||||
_changed = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user