Preload Dart sounds. Resolves issue 0000331
authorChristoph Sommer <mail@christoph-sommer.de>
Wed, 2 Apr 2008 18:19:42 +0000 (18:19 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Wed, 2 Apr 2008 18:19:42 +0000 (18:19 +0000)
SVN-Revision: 5383

src/badguy/dart.cpp

index 9df6e8c..f952492 100644 (file)
@@ -33,6 +33,7 @@ Dart::Dart(const lisp::Lisp& reader)
 {
   physic.enable_gravity(false);
   countMe = false;
+  sound_manager->preload(SOUNDFILE);
   sound_manager->preload("sounds/darthit.wav");
   sound_manager->preload("sounds/stomp.wav");
 }
@@ -42,6 +43,7 @@ Dart::Dart(const Vector& pos, Direction d, const BadGuy* parent = 0)
 {
   physic.enable_gravity(false);
   countMe = false;
+  sound_manager->preload(SOUNDFILE);
   sound_manager->preload("sounds/darthit.wav");
   sound_manager->preload("sounds/stomp.wav");
 }
@@ -49,7 +51,7 @@ Dart::Dart(const Vector& pos, Direction d, const BadGuy* parent = 0)
 Dart::Dart(const Dart& other)
        : BadGuy(other), parent(other.parent)
 {
-  sound_source.reset(sound_manager->create_sound_source(SOUNDFILE));
+  sound_manager->preload(SOUNDFILE);
   sound_manager->preload("sounds/darthit.wav");
   sound_manager->preload("sounds/stomp.wav");
 }