QTfrontend/pageeditteam.cpp
changeset 5549 ccfb9b8ab9d1
parent 5545 980d44fe2d4c
child 5886 a4a620f68b22
--- a/QTfrontend/pageeditteam.cpp	Thu Aug 11 23:07:45 2011 -0400
+++ b/QTfrontend/pageeditteam.cpp	Fri Aug 12 10:36:37 2011 -0400
@@ -358,14 +358,16 @@
     mySdli->SDLMusicInit();
     
     tmpdir.cd(cfgdir->absolutePath());
-    if (!tmpdir.cd("Data/Sounds/voices") && !tmpdir.cd(CBVoicepack->currentText())) {
+    tmpdir.cd("Data/Sounds/voices");
+    tmpdir.cd(CBVoicepack->currentText());
+    
+    if (!tmpdir.exists()) {
         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);