diff --git a/config/firstrun.cfg b/config/firstrun.cfg index 751c4101..8efad755 100644 --- a/config/firstrun.cfg +++ b/config/firstrun.cfg @@ -1,8 +1,6 @@ -sleep 100 welcome +// executed at first run, don't change + +music "pingpong/03-pp-kamikadze.ogg" (* 89 1000) " " // 90 secs, fade +showmenu "QUICK setup" + -alias welcome [ - sleep 1000 [ - music "pingpong/03-pp-kamikadze.ogg" (* 89 1000) " " // 90 secs, fade - showmenu "QUICK setup" - ] -] \ No newline at end of file diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index d25dc4aa..ff767b03 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -576,11 +576,6 @@ void startmap(const char *name) // called just after a map load intermission = false; minutesremaining = -1; if(*clientmap) conoutf("game mode is \"%s\"", modestr(gamemode, modeacronyms > 0)); - if(firstrun && name && name[0]) - { - execfile("config/firstrun.cfg"); - firstrun = false; - } } void suicide() diff --git a/source/src/main.cpp b/source/src/main.cpp index e6d0d311..175b7b7e 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -659,6 +659,12 @@ int main(int argc, char **argv) if(frames>4) SDL_GL_SwapBuffers(); } + if(firstrun && frames>4) // run once + { + execfile("config/firstrun.cfg"); + firstrun = false; + } + #ifdef _DEBUG if(millis>lastflush+60000) { fflush(stdout); lastflush = millis; diff --git a/source/src/sound.cpp b/source/src/sound.cpp index c6a14019..22aceefb 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -246,6 +246,8 @@ struct source // AC sound scheduler, manages available sound sources // under load it uses priority and distance information to reassign its resources +VARP(soundchannels, 4, 32, 1024); + struct sourcescheduler { bool sourcesavail; @@ -265,7 +267,7 @@ struct sourcescheduler { sourcesavail = true; - loopi(31) + loopi(soundchannels) { source *src = new source(); if(src->valid) sources.add(src); @@ -507,7 +509,6 @@ struct oggstream return active; } - void reset() { if(isopen) @@ -1148,7 +1149,6 @@ void soundcleanup() if(nosound) return; stopsound(); - //gamesounds.setsizenodelete(0); gamesounds.setsize(0); clearsounds(); @@ -1161,8 +1161,6 @@ void soundcleanup() void clearsounds() { if(gamemusic) gamemusic->reset(); - //mapsounds.setsizenodelete(0); - //locations.setsize(0); mapsounds.setsize(0); locations.deletecontentsp(); }