From: Christoph Sommer Date: Wed, 2 Apr 2008 18:19:42 +0000 (+0000) Subject: Preload Dart sounds. Resolves issue 0000331 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=708a1fe72ec39e9fb35100c60e0fccc2d06a2481;p=supertux.git Preload Dart sounds. Resolves issue 0000331 SVN-Revision: 5383 --- diff --git a/src/badguy/dart.cpp b/src/badguy/dart.cpp index 9df6e8ce4..f95249211 100644 --- a/src/badguy/dart.cpp +++ b/src/badguy/dart.cpp @@ -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"); }