summaryrefslogtreecommitdiff
path: root/source/cl_main.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2007-08-21 17:21:59 +0000
committerAndrey Nazarov <skuller@skuller.net>2007-08-21 17:21:59 +0000
commita52b8ee9fa84e9d5e04224332b97a551350fbec6 (patch)
tree6ac3ebffcdb861752b28f7aef49fe3ee6bd06961 /source/cl_main.c
parent30af9a540f8a637d9ee8d6a750f9648fd316dec4 (diff)
Fixed occasional "sfx out of range" error when fs_restart'ing in game.
Diffstat (limited to 'source/cl_main.c')
-rw-r--r--source/cl_main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/cl_main.c b/source/cl_main.c
index 357e40f..bc04446 100644
--- a/source/cl_main.c
+++ b/source/cl_main.c
@@ -1504,7 +1504,7 @@ void CL_UpdateUserinfo( cvar_t *var, cvarSetSource_t source ) {
CL_Userinfo_f
==============
*/
-void CL_Userinfo_f ( void ) {
+static void CL_Userinfo_f ( void ) {
Com_Printf ( "User info settings:\n" );
Info_Print ( Cvar_Userinfo() );
}
@@ -1514,12 +1514,10 @@ void CL_Userinfo_f ( void ) {
CL_RegisterSounds
======================
*/
-void CL_RegisterSounds( void ) {
+static void CL_RegisterSounds( void ) {
int i;
char *s;
- SCR_LoadingString( "sounds" );
-
S_BeginRegistration ();
CL_RegisterTEntSounds ();
for ( i = 1; i < MAX_SOUNDS; i++ ) {
@@ -1539,18 +1537,18 @@ Restart the sound subsystem so it can pick up
new parameters and flush all sounds
=================
*/
-void CL_Snd_Restart_f ( void ) {
+static void CL_Snd_Restart_f ( void ) {
S_Shutdown ();
S_Init ();
CL_RegisterSounds ();
}
-int precache_check; // for autodownload of precache items
-int precache_spawncount;
-int precache_tex;
-int precache_model_skin;
+static int precache_check; // for autodownload of precache items
+static int precache_spawncount;
+static int precache_tex;
+static int precache_model_skin;
-byte *precache_model; // used for skin checking in alias models
+static byte *precache_model; // used for skin checking in alias models
#define PLAYER_MULT 5
@@ -1558,8 +1556,7 @@ byte *precache_model; // used for skin checking in alias models
#define ENV_CNT (CS_PLAYERSKINS + MAX_CLIENTS * PLAYER_MULT)
#define TEXTURE_CNT (ENV_CNT+13)
-static const char *env_suf[ 6 ] = {"rt", "bk", "lf", "ft", "up", "dn"
- };
+static const char env_suf[6][3] = { "rt", "bk", "lf", "ft", "up", "dn" };
void CL_RequestNextDownload ( void ) {
unsigned map_checksum; // for detecting cheater maps
@@ -1827,7 +1824,9 @@ void CL_RequestNextDownload ( void ) {
//ZOID
+ SCR_LoadingString( "sounds" );
CL_RegisterSounds ();
+
CL_PrepRefresh ();
LOC_LoadLocations();
@@ -1870,6 +1869,7 @@ static void CL_Precache_f( void ) {
SCR_LoadingString( "collision map" );
CM_LoadMap( &cl.cm, cl.configstrings[ CS_MODELS + 1 ],
CM_LOAD_CLIENT, &map_checksum );
+ SCR_LoadingString( "sounds" );
CL_RegisterSounds();
CL_PrepRefresh();
cls.state = ca_precached;