fixed firstrun sound

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2204 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-07-23 22:30:18 +00:00
parent 5523ec69d8
commit 85361fb5a3
4 changed files with 14 additions and 17 deletions
+5 -7
View File
@@ -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"
]
]
-5
View File
@@ -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()
+6
View File
@@ -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;
+3 -5
View File
@@ -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();
}