]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Reverting file paths changes; they make the problem a lot worse (segfaults)
[lugaru.git] / Source / GameTick.cpp
index b6378d134014e9bb515149b5da05c69797f235fd..670bdcfecd3097cf5d42e359b91eb3d4d831a321 100644 (file)
@@ -76,8 +76,6 @@ extern bool mousejump;
 extern float viewdistance;
 extern bool freeze;
 extern bool autoslomo;
-extern int newnetmessages;
-extern char netmessages[256];
 extern bool keyboardfrozen;
 extern int netdatanew;
 extern bool loadingstuff;
@@ -1691,36 +1689,6 @@ void     Game::Tick()
 
        float headprop,bodyprop,armprop,legprop;
 
-       if(newnetmessages){
-               newnetmessages=0;
-               PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true);
-               OPENAL_SetVolume(channels[consolesuccesssound], 256);
-               OPENAL_SetPaused(channels[consolesuccesssound], false);
-
-               for(k=14;k>=2;k--){
-                       for(j=0;j<255;j++){
-                               consoletext[k][j]=consoletext[k-1][j];
-                       }
-                       consolechars[k]=consolechars[k-1];
-               }
-               for(k=14;k>=2;k--){
-                       for(j=0;j<255;j++){
-                               displaytext[k][j]=displaytext[k-1][j];
-                       }
-                       displaychars[k]=displaychars[k-1];
-                       displaytime[k]=displaytime[k-1];
-               }
-               for(j=0;j<255;j++){
-                       consoletext[1][j]=' ';
-                       displaytext[1][j]=' ';
-               }
-               sprintf (consoletext[1], netmessages);
-               sprintf (displaytext[1], netmessages);
-               consolechars[1]=255;
-               displaychars[1]=255;
-               displaytime[1]=0;
-       }
-
        for(i=0;i<15;i++){
                displaytime[i]+=multiplier;
        }
@@ -1743,7 +1711,7 @@ void      Game::Tick()
                        entername=0;
                        mainmenutogglekeydown=1;
                }
-               if((IsKeyDown(theKeyMap, MAC_ESCAPE_KEY)||(mainmenu==0&&((IsKeyDown(theKeyMap, jumpkey)||IsKeyDown(theKeyMap, MAC_SPACE_KEY)||(campaign)))&&!oldjumpkeydown&&campaign&&winfreeze))&&!mainmenutogglekeydown&&(!mainmenu||gameon||mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||(mainmenu==7&&!entername)||mainmenu==9||mainmenu==11||(mainmenu==12&&!tryquit)||mainmenu==13||mainmenu==14||mainmenu==15||mainmenu==16||mainmenu==17||mainmenu==10)){
+               if((IsKeyDown(theKeyMap, MAC_ESCAPE_KEY)||(mainmenu==0&&((IsKeyDown(theKeyMap, jumpkey)||IsKeyDown(theKeyMap, MAC_SPACE_KEY)||(campaign)))&&!oldjumpkeydown&&campaign&&winfreeze))&&!mainmenutogglekeydown&&(!mainmenu||gameon||mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||(mainmenu==7&&!entername)||mainmenu==9||mainmenu==11||mainmenu==13||mainmenu==17||mainmenu==10)){
                        selected=-1;
                        if(mainmenu==1||mainmenu==2||mainmenu==0){
                                if(mainmenu==0&&!winfreeze)mainmenu=2;
@@ -1871,10 +1839,6 @@ void     Game::Tick()
 
                                if(newdetail>2)newdetail=detail;
                                if(newdetail<0)newdetail=detail;
-#if !USE_SDL  // we'll take anything that works.
-                               if(newscreenwidth>3000)newscreenwidth=screenwidth;
-                               if(newscreenheight>3000)newscreenheight=screenheight;
-#endif
                                if(newscreenwidth<0)newscreenwidth=screenwidth;
                                if(newscreenheight<0)newscreenheight=screenheight;
 
@@ -1954,7 +1918,7 @@ void      Game::Tick()
                                opstream << KeyToChar(chatkey);
                                opstream.close();
                        }
-                       if(mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==9||mainmenu==12||mainmenu==13||mainmenu==14||mainmenu==10||mainmenu==11||mainmenu==100){
+                       if(mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==9||mainmenu==13||mainmenu==10||mainmenu==11||mainmenu==100){
                                float gLoc[3]={0,0,0};
                                float vel[3]={0,0,0};
                                OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
@@ -1979,9 +1943,7 @@ void      Game::Tick()
                        if(mainmenu==7)mainmenu=1;
                        if(mainmenu==9)mainmenu=5;
                        if(mainmenu==11)mainmenu=5;
-                       if(mainmenu==12)mainmenu=5;
                        if(mainmenu==13)mainmenu=12;
-                       if(mainmenu==14)mainmenu=13;
                        if(mainmenu==10)mainmenu=5;
                        if(mainmenu==100){
                                mainmenu=5;
@@ -2111,7 +2073,7 @@ void      Game::Tick()
                                if(!gameon){
                                        //quit
                                        tryquit=1;
-                                       if(registered)OPENAL_SetPaused(channels[stream_music3], true);
+                                       OPENAL_SetPaused(channels[stream_music3], true);
                                }
                                else{
                                        //end game
@@ -2135,7 +2097,7 @@ void      Game::Tick()
                                OPENAL_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f);
                        }
                        if(Button()&&!oldbutton&&selected==0){
-                               #if USE_SDL
+                       
                                extern SDL_Rect **resolutions;
                                bool isCustomResolution = true;
                                bool found = false;
@@ -2180,56 +2142,7 @@ void     Game::Tick()
                                        newscreenheight = (int) resolutions[0]->h;
                                }
 
-                               #else
-                               int whichres;
-                               whichres=-1;
-                               if(newscreenwidth==640&&newscreenheight==480)whichres=0;
-                               if(newscreenwidth==800&&newscreenheight==600)whichres=1;
-                               if(newscreenwidth==1024&&newscreenheight==768)whichres=2;
-                               if(newscreenwidth==1280&&newscreenheight==1024)whichres=3;
-                               if(newscreenwidth==1600&&newscreenheight==1200)whichres=4;
-                               if(newscreenwidth==840&&newscreenheight==524)whichres=5;
-                               if(newscreenwidth==1024&&newscreenheight==640)whichres=6;
-                               if(newscreenwidth==1344&&newscreenheight==840)whichres=7;
-                               if(newscreenwidth==1920&&newscreenheight==1200)whichres=8;
-
-                               if(whichres==-1||whichres==8){
-                                       newscreenwidth=640;
-                                       newscreenheight=480;
-                               }
-                               if(whichres==0){
-                                       newscreenwidth=800;
-                                       newscreenheight=600;
-                               }
-                               if(whichres==1){
-                                       newscreenwidth=1024;
-                                       newscreenheight=768;
-                               }
-                               if(whichres==2){
-                                       newscreenwidth=1280;
-                                       newscreenheight=1024;
-                               }
-                               if(whichres==3){
-                                       newscreenwidth=1600;
-                                       newscreenheight=1200;
-                               }
-                               if(whichres==4){
-                                       newscreenwidth=840;
-                                       newscreenheight=524;
-                               }
-                               if(whichres==5){
-                                       newscreenwidth=1024;
-                                       newscreenheight=640;
-                               }
-                               if(whichres==6){
-                                       newscreenwidth=1344;
-                                       newscreenheight=840;
-                               }
-                               if(whichres==7){
-                                       newscreenwidth=1920;
-                                       newscreenheight=1200;
-                               }
-                               #endif
+                               
                        }
                        if(Button()&&!oldbutton&&selected==1){
                                newdetail++;
@@ -2320,10 +2233,6 @@ void     Game::Tick()
 
                                if(newdetail>2)newdetail=detail;
                                if(newdetail<0)newdetail=detail;
-#if !USE_SDL  // we'll take anything that works.
-                               if(newscreenwidth>3000)newscreenwidth=screenwidth;
-                               if(newscreenheight>3000)newscreenheight=screenheight;
-#endif
                                if(newscreenwidth<0)newscreenwidth=screenwidth;
                                if(newscreenheight<0)newscreenheight=screenheight;
 
@@ -2490,33 +2399,6 @@ void     Game::Tick()
                }
 
                if(mainmenu==5){
-                       if(accountcampaignchoicesmade[accountactive]>8&&!registered){
-                               OPENAL_SetFrequency(OPENAL_ALL, 0.001);
-                               PlayStreamEx( stream_music3, strm[stream_music3], NULL, true);
-                               OPENAL_SetPaused(channels[stream_music3], false);
-                               OPENAL_SetVolume(channels[stream_music3], 256);
-
-                               gameon=0;
-                               mainmenu=12;
-                               accountcampaignchoicesmade[accountactive]=0;
-                               accountcampaignscore[accountactive]=0;
-                               accountcampaigntime[accountactive]=0;
-
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-                       }
 
                        if(endgame==2){
                                accountcampaignchoicesmade[accountactive]=0;
@@ -2814,94 +2696,6 @@ void     Game::Tick()
                        else oldbutton=0;
                }
 
-               if(mainmenu==15||mainmenu==16){
-                       if(Button()&&!oldbutton&&selected==1){
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-
-                               if(mainmenu==15)mainmenu=5;
-                               else mainmenu=12;
-                       }
-                       if(Button())oldbutton=1;
-                       else oldbutton=0;
-               }
-
-               if(mainmenu==12){
-                       endgame=2;
-                       if(Button()&&!oldbutton&&selected==3){
-                               if(tryquit)quit=1;
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-
-                               mainmenu=5;
-                       }
-
-                       if(Button()&&!oldbutton&&selected==4){
-                               registernow=1;
-                               quit=1;
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-                       }
-
-
-                       if(Button()&&!oldbutton&&selected==5){
-                               tryquit=0;
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-
-                               mainmenu=13;
-                       }
-                       if(Button())oldbutton=1;
-                       else oldbutton=0;
-               }
                if(mainmenu==6){
                        if(Button()&&!oldbutton&&selected!=-1){
                                float gLoc[3]={0,0,0};
@@ -3068,10 +2862,6 @@ void     Game::Tick()
                        if(mainmenu==3){
                                if(newdetail>2)newdetail=detail;
                                if(newdetail<0)newdetail=detail;
-#if !USE_SDL  // we'll take anything that works.
-                               if(newscreenwidth>3000)newscreenwidth=screenwidth;
-                               if(newscreenheight>3000)newscreenheight=screenheight;
-#endif
                                if(newscreenwidth<0)newscreenwidth=screenwidth;
                                if(newscreenheight<0)newscreenheight=screenheight;
 
@@ -3164,7 +2954,7 @@ void      Game::Tick()
                }
                OPENAL_SetFrequency(channels[stream_music3], 22050);
 
-               if(entername||mainmenu==13||mainmenu==14){
+               if(entername){
                        for(i=0;i<140;i++){
                                if(IsKeyDown(theKeyMap, i)){
                                        togglekeydelay[i]+=multiplier;
@@ -3250,114 +3040,13 @@ void   Game::Tick()
                                                                displayselected=0;
                                                        }}
 
-                                               if(i==MAC_RETURN_KEY&&mainmenu==14){
-                                                       if(displaychars[0]){
-                                                               char serialstring[256];
-                                                               char tempstring[256];
-                                                               #if defined(__APPLE__)
-                                                               sprintf (tempstring, "%s", registrationname);
-                                                               #elif defined(_WIN32) || defined(__linux__)
-                                                               sprintf (tempstring, "%s-windows", registrationname);
-                                                               #else
-                                                               #error Please make sure you have the right registration key stuff here!
-                                                               #endif
-                                                               long num1;
-                                                               long num2;
-                                                               long num3;
-                                                               long num4;
-                                                               long long longnum;
-                                                               longnum = MD5_string ( tempstring);
-                                                               //longnum = 1111111111111111;
-                                                               num1 = longnum/100000000;
-                                                               num2 = longnum%100000000;
-                                                               sprintf (tempstring, "%d-%d-%d-%d\0\0\0\0\0", num1/10000, num1%10000, num2/10000, num2%10000);
-
-                                                               int goodcode=3;
-                                                               int numchars=3;
-                                                               if(num1/10000>999)numchars+=4;
-                                                               else if(num1/10000>99)numchars+=3;
-                                                               else if(num1/10000>9)numchars+=2;
-                                                               else numchars+=1;
-                                                               if(num1%10000>999)numchars+=4;
-                                                               else if(num1%10000>99)numchars+=3;
-                                                               else if(num1%10000>9)numchars+=2;
-                                                               else numchars+=1;
-                                                               if(num2/10000>999)numchars+=4;
-                                                               else if(num2/10000>99)numchars+=3;
-                                                               else if(num2/10000>9)numchars+=2;
-                                                               else numchars+=1;
-                                                               if(num2%10000>999)numchars+=4;
-                                                               else if(num2%10000>99)numchars+=3;
-                                                               else if(num2%10000>9)numchars+=2;
-                                                               else numchars+=1;
-
-                                                               //numchars=12;
-
-                                                               for(j=0;j<numchars;j++){
-                                                                       if(displaytext[0][j]!=tempstring[j]&&tempstring[j]!=' '&&tempstring[j]!='\0')goodcode--;
-                                                               }
-
-                                                               if(longnum==LONGLONGCONST(5077041556214789))goodcode=-1;
-
-                                                               if(goodcode<0)goodcode=0;
-
-                                                               if(goodcode){
-                                                                       registered=1;
-                                                                       mainmenu=15;
-
-                                                                       FILE                    *tfile;
-                                                                       tfile=fopen( ":Data:Sounds:flame.ogg", "wb" );
-                                                                       if (tfile)
-                                                                       {
-                                                                               int numchars;
-                                                                               numchars=strlen(registrationname);
-                                                                               fpackf(tfile, "Bb", registered);
-                                                                               fpackf(tfile, "Bi", numchars);
-                                                                               if(numchars>0)
-                                                                               {
-                                                                                       for(j=0;j<numchars;j++)
-                                                                                       {
-                                                                                               fpackf(tfile, "Bb",  registrationname[j]);
-                                                                                       }
-                                                                               }
-                                                                               fpackf(tfile, "Bi", num1);
-                                                                               fpackf(tfile, "Bi", num2);
-                                                                               fclose(tfile);
-                                                                       }
-                                                               }
-                                                               else
-                                                               {
-                                                                       mainmenu=16;
-                                                               }
-                                                               flashr=1;
-                                                               flashg=0;
-                                                               flashb=0;
-                                                               flashamount=1;
-                                                               flashdelay=1;
-
-                                                               float gLoc[3]={0,0,0};
-                                                               float vel[3]={0,0,0};
-                                                               OPENAL_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f);
-                                                               PlaySoundEx( firestartsound, samp[firestartsound], NULL, true);
-                                                               OPENAL_3D_SetAttributes(channels[firestartsound], gLoc, vel);
-                                                               OPENAL_SetVolume(channels[firestartsound], 256);
-                                                               OPENAL_SetPaused(channels[firestartsound], false);
-                                                               OPENAL_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f);
-
-                                                               for(j=0;j<255;j++){
-                                                                       displaytext[0][j]=' ';
-                                                               }
-                                                               displaychars[0]=0;
-                                                               displayselected=0;
-                                                       }}
-
                                                if(i==MAC_RETURN_KEY&&mainmenu==13){
                                                        if(displaychars[0]){
                                                                sprintf (registrationname, "%s", displaytext[0]);
                                                                if(displaychars[0]<254)registrationname[displaychars[0]]='\0';
 
-                                                               mainmenu=14;
-
+                                                               mainmenu=5;
+                        
                                                                flashr=1;
                                                                flashg=0;
                                                                flashb=0;
@@ -3377,21 +3066,7 @@ void     Game::Tick()
                                                                        displaytext[0][j]=' ';
                                                                }
                                                                displaychars[0]=0;
-
-                                                               /*char tempstring[50];
-                                                               sprintf (tempstring, registrationname);
-                                                               long num1;
-                                                               long num2;
-                                                               long num3;
-                                                               long num4;
-                                                               long long longnum;
-                                                               longnum = MD5_string ( tempstring);
-                                                               num1 = longnum/100000000;
-                                                               num2 = longnum%100000000;
-                                                               sprintf (displaytext[0], "%d-%d-%d-%d", num1/10000, num1%10000, num2/10000, num2%10000);
-
-                                                               displaychars[0]=strlen(displaytext[0]);
-                                                               */
+                        
                                                                displayselected=0;
                                                        }}
                                        }
@@ -5714,10 +5389,6 @@ void     Game::Tick()
                        if(mainmenu==3){
                                if(newdetail>2)newdetail=detail;
                                if(newdetail<0)newdetail=detail;
-#if !USE_SDL  // we'll take anything that works.
-                               if(newscreenwidth>3000)newscreenwidth=screenwidth;
-                               if(newscreenheight>3000)newscreenheight=screenheight;
-#endif
                                if(newscreenwidth<0)newscreenwidth=screenwidth;
                                if(newscreenheight<0)newscreenheight=screenheight;
 
@@ -11000,55 +10671,7 @@ void   Game::TickOnce(){
                        if(rotation2<-70)rotation2=-70;
                }
                if(mainmenu)rotation+=multiplier*5;
-               if(!mainmenu&&!indemo&&!registered){
-                       OPENAL_SetFrequency(OPENAL_ALL, 0.001);
-                       PlayStreamEx( stream_music3, strm[stream_music3], NULL, true);
-                       OPENAL_SetPaused(channels[stream_music3], false);
-                       OPENAL_SetVolume(channels[stream_music3], 256);
-
-                       gameon=0;
-                       mainmenu=12;
-
-                       float gLoc[3]={0,0,0};
-                       float vel[3]={0,0,0};
-                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                       PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                       OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                       OPENAL_SetVolume(channels[fireendsound], 256);
-                       OPENAL_SetPaused(channels[fireendsound], false);
-                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                       flashr=1;
-                       flashg=0;
-                       flashb=0;
-                       flashamount=1;
-                       flashdelay=1;
-               }
-
-               if(tryquit==1&&!registered&&mainmenu!=12){
-                       OPENAL_SetFrequency(OPENAL_ALL, 0.001);
-                       PlayStreamEx( stream_music3, strm[stream_music3], NULL, true);
-                       OPENAL_SetPaused(channels[stream_music3], false);
-                       OPENAL_SetVolume(channels[stream_music3], 256);
-
-                       gameon=0;
-                       mainmenu=12;
-
-                       float gLoc[3]={0,0,0};
-                       float vel[3]={0,0,0};
-                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                       PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                       OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                       OPENAL_SetVolume(channels[fireendsound], 256);
-                       OPENAL_SetPaused(channels[fireendsound], false);
-                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                       flashr=1;
-                       flashg=0;
-                       flashb=0;
-                       flashamount=1;
-                       flashdelay=1;
-               }
+      
                //}
 }
 
@@ -11371,32 +10994,7 @@ void   Game::TickOnceAfter(){
                                                        }
                                                        if(changedelay<=-999&&whichlevel!=-2&&!loading&&(player[0].dead||(alldead&&maptype==mapkilleveryone)||(winhotspot)||(killhotspot))&&!winfreeze)loading=1;
                                                        if((player[0].dead||(alldead&&maptype==mapkilleveryone)||(winhotspot)||(windialogue)||(killhotspot))&&changedelay<=0){
-                                                               if(accountprogress[accountactive]>3&&!registered){
-                                                                       OPENAL_SetFrequency(OPENAL_ALL, 0.001);
-                                                                       PlayStreamEx( stream_music3, strm[stream_music3], NULL, true);
-                                                                       OPENAL_SetPaused(channels[stream_music3], false);
-                                                                       OPENAL_SetVolume(channels[stream_music3], 256);
-
-                                                                       gameon=0;
-                                                                       mainmenu=12;
-                                                                       accountprogress[accountactive]=3;
-
-                                                                       float gLoc[3]={0,0,0};
-                                                                       float vel[3]={0,0,0};
-                                                                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                                                                       PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                                                                       OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                                                                       OPENAL_SetVolume(channels[fireendsound], 256);
-                                                                       OPENAL_SetPaused(channels[fireendsound], false);
-                                                                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                                                                       flashr=1;
-                                                                       flashg=0;
-                                                                       flashb=0;
-                                                                       flashamount=1;
-                                                                       flashdelay=1;
-                                                               }
-                                                               else{
+                        {
                                                                        if(whichlevel!=-2&&!loading&&!player[0].dead){
                                                                                winfreeze=1;
                                                                                changedelay=-999;