]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
fixed a crash with lights that have no clusters (a light outside the level) by alloca...
[xonotic/darkplaces.git] / sv_main.c
index ae0a38bc43c4b2188b5b266d521d88f95818a60b..8005c874810e89418eb1fdfd61cd5f77bb18c817 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1354,7 +1354,7 @@ int SV_ModelIndex(char *s, int precachemode)
                                        Con_Printf("SV_ModelIndex(\"%s\"): not precached (fix your code), precaching anyway\n", filename);
                                strlcpy(sv.model_precache[i], filename, sizeof(sv.model_precache[i]));
                                sv.models[i] = Mod_ForName (sv.model_precache[i], true, false, false);
-                               if (sv.protocol == PROTOCOL_DARKPLACES6)
+                               if (sv.protocol == PROTOCOL_DARKPLACES6 && sv.state != ss_loading)
                                {
                                        MSG_WriteByte(&sv.reliable_datagram, svc_precache);
                                        MSG_WriteShort(&sv.reliable_datagram, i);
@@ -1402,7 +1402,7 @@ int SV_SoundIndex(char *s, int precachemode)
                                if (precachemode == 1)
                                        Con_Printf("SV_SoundIndex(\"%s\"): not precached (fix your code), precaching anyway\n", filename);
                                strlcpy(sv.sound_precache[i], filename, sizeof(sv.sound_precache[i]));
-                               if (sv.protocol == PROTOCOL_DARKPLACES6)
+                               if (sv.protocol == PROTOCOL_DARKPLACES6 && sv.state != ss_loading)
                                {
                                        MSG_WriteByte(&sv.reliable_datagram, svc_precache);
                                        MSG_WriteShort(&sv.reliable_datagram, i + 32768);
@@ -1607,6 +1607,9 @@ void SV_SpawnServer (const char *server)
 
        Con_DPrintf("SpawnServer: %s\n", server);
 
+       if (cls.state != ca_dedicated)
+               SCR_BeginLoadingPlaque();
+
        snprintf (modelname, sizeof(modelname), "maps/%s.bsp", server);
        worldmodel = Mod_ForName(modelname, false, true, true);
        if (!worldmodel || !worldmodel->TraceBox)