X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=f162cf2eb0dc67c66fc0d79be2dfee07043f3db1;hb=03d2547e2b2b3254158b3e2ebce64566909bf9ad;hp=2f59318d62f71a362506c5d231797bacbaf333dc;hpb=00a1f5e166e2943b328c6f9bff3dbc548efb2ce7;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 2f59318..f162cf2 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -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; @@ -885,9 +883,12 @@ void Game::Loadlevel(char *name){ OPENAL_SetPaused(channels[whooshsound], true); OPENAL_SetPaused(channels[stream_firesound], true); + // Change the map filename into something that is os specific + char *FixedFN = ConvertFileName(name); + int mapvers; FILE *tfile; - tfile=fopen( name, "rb" ); + tfile=fopen( FixedFN, "rb" ); if(tfile) { OPENAL_SetPaused(channels[stream_firesound], true); @@ -1691,36 +1692,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; } @@ -3490,7 +3461,7 @@ void Game::Tick() FILE *tfile; - tfile=fopen( mapname, "wb" ); + tfile=fopen( ConvertFileName(mapname), "wb" ); fpackf(tfile, "Bi", mapvers); //fpackf(tfile, "Bi", indemo); fpackf(tfile, "Bi", maptype);