QTfrontend/pageeditteam.cpp
changeset 5545 980d44fe2d4c
parent 5308 c57a8878eebe
child 5549 ccfb9b8ab9d1
--- a/QTfrontend/pageeditteam.cpp	Thu Aug 11 00:18:10 2011 +0200
+++ b/QTfrontend/pageeditteam.cpp	Thu Aug 11 22:33:56 2011 -0400
@@ -358,16 +358,14 @@
     mySdli->SDLMusicInit();
     
     tmpdir.cd(cfgdir->absolutePath());
-    tmpdir.cd("Data/Sounds/voices");
-    tmpdir.cd(CBVoicepack->currentText());
-    
-    if (!tmpdir.exists()) {
+    if (!tmpdir.cd("Data/Sounds/voices") && !tmpdir.cd(CBVoicepack->currentText())) {
         tmpdir.cd(datadir->absolutePath());
         tmpdir.cd("Sounds/voices");
         tmpdir.cd(CBVoicepack->currentText());
     }
 
     QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files);
+
     if (list.size()) {
         sound = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
         Mix_PlayChannel(-1, sound, 0);