diff --git a/nq/source/cl_parse.c b/nq/source/cl_parse.c index c9bebae7a..c93bc05fc 100644 --- a/nq/source/cl_parse.c +++ b/nq/source/cl_parse.c @@ -266,7 +266,7 @@ CL_ParseServerInfo (void) Con_DPrintf ("Serverinfo packet received.\n"); - S_BlockSound (); + S_StopAllSounds (true); // wipe the client_state_t struct CL_ClearState (); @@ -275,13 +275,13 @@ CL_ParseServerInfo (void) i = MSG_ReadLong (net_message); if (i != PROTOCOL_VERSION) { Con_Printf ("Server returned version %i, not %i", i, PROTOCOL_VERSION); - goto done; + return; } // parse maxclients cl.maxclients = MSG_ReadByte (net_message); if (cl.maxclients < 1 || cl.maxclients > MAX_SCOREBOARD) { Con_Printf ("Bad maxclients (%u) from server\n", cl.maxclients); - goto done; + return; } cl.scores = Hunk_AllocName (cl.maxclients * sizeof (*cl.scores), "scores"); @@ -310,7 +310,7 @@ CL_ParseServerInfo (void) break; if (nummodels == MAX_MODELS) { Con_Printf ("Server sent too many model precaches\n"); - goto done; + return; } strcpy (model_precache[nummodels], str); Mod_TouchModel (str); @@ -324,7 +324,7 @@ CL_ParseServerInfo (void) break; if (numsounds == MAX_SOUNDS) { Con_Printf ("Server sent too many sound precaches\n"); - goto done; + return; } strcpy (sound_precache[numsounds], str); S_TouchSound (str); @@ -338,7 +338,7 @@ CL_ParseServerInfo (void) cl.model_precache[i] = Mod_ForName (model_precache[i], false); if (cl.model_precache[i] == NULL) { Con_Printf ("Model %s not found\n", model_precache[i]); - goto done; + return; } CL_KeepaliveMessage (); } @@ -358,8 +358,6 @@ CL_ParseServerInfo (void) noclip_anglehack = false; // noclip is turned off at start r_gravity = 800.0; // Set up gravity for renderer effects -done: - S_UnblockSound (); } int bitcounts[16]; diff --git a/nq/source/sv_ded.c b/nq/source/sv_ded.c index 016f486e7..81166c687 100644 --- a/nq/source/sv_ded.c +++ b/nq/source/sv_ded.c @@ -311,16 +311,6 @@ V_Init_Cvars (void) { } -void -S_BlockSound (void) -{ -} - -void -S_UnblockSound (void) -{ -} - plugin_t *console_client_PluginInfo (void); plugin_t * console_client_PluginInfo (void) diff --git a/nq/source/sv_main.c b/nq/source/sv_main.c index f76b7b112..7626654eb 100644 --- a/nq/source/sv_main.c +++ b/nq/source/sv_main.c @@ -903,7 +903,6 @@ SV_SpawnServer (const char *server) int i; edict_t *ent; - S_BlockSound (); // let's not have any servers with no name if (hostname->string[0] == 0) Cvar_Set (hostname, "UNNAMED"); @@ -975,7 +974,6 @@ SV_SpawnServer (const char *server) if (!sv.worldmodel) { Con_Printf ("Couldn't spawn server %s\n", sv.modelname); sv.active = false; - S_UnblockSound (); return; } sv.models[1] = sv.worldmodel; @@ -1040,5 +1038,4 @@ SV_SpawnServer (const char *server) SV_SendServerinfo (host_client); Con_DPrintf ("Server spawned.\n"); - S_UnblockSound (); }