-{
- if (set_direction) dir = initial_direction;
- physic.set_velocity_x(dir == LEFT ? -::SPEED : ::SPEED);
- sprite->set_action(dir == LEFT ? "flying-left" : "flying-right");
-
- delete soundSource;
- soundSource = sound_manager->create_sound_source("sounds/flame.wav");
- if(soundSource) {
- soundSource->set_position(get_pos());
- soundSource->set_looping(true);
- soundSource->set_gain(1.0);
- soundSource->set_reference_distance(32);
- soundSource->play();
- } else {
- log_warning << "Couldn't start Dart ambient sound" << std::endl;
- }
+{
+ sound_source.reset(sound_manager->create_sound_source(DART_SOUND));
+ sound_source->set_position(get_pos());
+ sound_source->set_looping(true);
+ sound_source->set_gain(1.0);
+ sound_source->set_reference_distance(32);
+ sound_source->play();