]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
removed \n from all Host_Error, Sys_Error, PRVM_ERROR, PF_ERROR calls, since Host_Err...
[xonotic/darkplaces.git] / host_cmd.c
index 303ea0348263b6322861a737478284693d2e88a3..b3fd8db6be8ca8a2eec22bb8b106e8701b603b3a 100644 (file)
@@ -586,7 +586,7 @@ void Host_Loadgame_f (void)
 
        cls.demonum = -1;               // stop demo loop in case this fails
 
-       t = text = (char *)FS_LoadFile (filename, tempmempool, false);
+       t = text = (char *)FS_LoadFile (filename, tempmempool, false, NULL);
        if (!text)
        {
                Con_Print("ERROR: couldn't open.\n");
@@ -680,7 +680,7 @@ void Host_Loadgame_f (void)
                        if (entnum >= MAX_EDICTS)
                        {
                                Mem_Free(text);
-                               Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)\n", MAX_EDICTS);
+                               Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)", MAX_EDICTS);
                        }
                        while (entnum >= prog->max_edicts)
                                //SV_IncreaseEdicts();
@@ -1347,9 +1347,12 @@ void Host_Spawn_f (void)
        // send all current light styles
        for (i=0 ; i<MAX_LIGHTSTYLES ; i++)
        {
-               MSG_WriteByte (&host_client->message, svc_lightstyle);
-               MSG_WriteByte (&host_client->message, (char)i);
-               MSG_WriteString (&host_client->message, sv.lightstyles[i]);
+               if (sv.lightstyles[i][0])
+               {
+                       MSG_WriteByte (&host_client->message, svc_lightstyle);
+                       MSG_WriteByte (&host_client->message, (char)i);
+                       MSG_WriteString (&host_client->message, sv.lightstyles[i]);
+               }
        }
 
        // send some stats
@@ -1888,7 +1891,7 @@ static void MaxPlayers_f(void)
        if (svs.clients)
                Mem_Free(svs.clients);
        svs.maxclients = n;
-       svs.clients = Mem_Alloc(sv_mempool, sizeof(client_t) * svs.maxclients);
+       svs.clients = (client_t *)Mem_Alloc(sv_mempool, sizeof(client_t) * svs.maxclients);
        if (n == 1)
                Cvar_Set ("deathmatch", "0");
        else