]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.c
don't send free entities! (I've been observing this bug for months)
[xonotic/darkplaces.git] / common.c
index 199a33c02b0d934a989386290e7e58332a205b14..584bd837881759c23879e48d1fbd64129613d3d1 100644 (file)
--- a/common.c
+++ b/common.c
@@ -36,8 +36,6 @@ mempool_t *pak_mempool;
 
 qboolean com_modified;   // set true if using non-id files
 
-qboolean msg_suppress_1 = 0;
-
 void COM_InitFilesystem (void);
 
 char com_token[1024];
@@ -52,6 +50,7 @@ char com_cmdline[CMDLINE_LENGTH];
 int gamemode;
 char *gamename;
 char *gamedirname;
+char com_modname[MAX_OSPATH];
 
 /*
 
@@ -376,7 +375,7 @@ char *MSG_ReadString (void)
                        break;
                string[l] = c;
                l++;
-       } while (l < sizeof(string)-1);
+       } while (l < (int)sizeof(string)-1);
 
        string[l] = 0;
 
@@ -1084,7 +1083,7 @@ void COM_CopyFile (char *netpath, char *cachepath)
 
        while (remaining)
        {
-               if (remaining < sizeof(buf))
+               if (remaining < (int)sizeof(buf))
                        count = remaining;
                else
                        count = sizeof(buf);
@@ -1427,10 +1426,12 @@ void COM_InitFilesystem (void)
                com_basedir[i-1] = 0;
 
 // start up with GAMENAME by default (id1)
+       strcpy(com_modname, GAMENAME);
        COM_AddGameDirectory (va("%s/"GAMENAME, com_basedir));
        if (gamedirname[0])
        {
                com_modified = true;
+               strcpy(com_modname, gamedirname);
                COM_AddGameDirectory (va("%s/%s", com_basedir, gamedirname));
        }
 
@@ -1440,6 +1441,7 @@ void COM_InitFilesystem (void)
        if (i && i < com_argc-1)
        {
                com_modified = true;
+               strcpy(com_modname, com_argv[i+1]);
                COM_AddGameDirectory (va("%s/%s", com_basedir, com_argv[i+1]));
        }