]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
Rework game specific hacks to have a special group for Nexuiz-derived games.
[xonotic/darkplaces.git] / cl_parse.c
index 3ae26aa9657e1f9f92824ea7513494d0b65cf1be..48de06e7367e60e48212ed98e2565bffd08b9d69 100644 (file)
@@ -1220,7 +1220,7 @@ static void CL_BeginDownloads(qboolean aborteddownload)
                // finished loading sounds
        }
 
-       if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
+       if(IS_NEXUIZ_DERIVED(gamemode))
                Cvar_SetValueQuick(&cl_serverextension_download, false);
                // in Nexuiz/Xonotic, the built in download protocol is kinda broken (misses lots
                // of dependencies) anyway, and can mess around with the game directory;
@@ -1399,7 +1399,7 @@ static void CL_StopDownload(int size, int crc)
                        // save to disk only if we don't already have it
                        // (this is mainly for playing back demos)
                        existingcrc = FS_CRCFile(cls.qw_downloadname, &existingsize);
-                       if (existingsize || gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC || !strcmp(cls.qw_downloadname, csqc_progname.string))
+                       if (existingsize || IS_NEXUIZ_DERIVED(gamemode) || !strcmp(cls.qw_downloadname, csqc_progname.string))
                                // let csprogs ALWAYS go to dlcache, to prevent "viral csprogs"; also, never put files outside dlcache for Nexuiz/Xonotic
                        {
                                if ((int)existingsize != size || existingcrc != crc)
@@ -2219,7 +2219,7 @@ static void CL_ParseClientdata (void)
                cl.stats[STAT_NAILS] = MSG_ReadByte(&cl_message);
                cl.stats[STAT_ROCKETS] = MSG_ReadByte(&cl_message);
                cl.stats[STAT_CELLS] = MSG_ReadByte(&cl_message);
-               if (gamemode == GAME_HIPNOTIC || gamemode == GAME_ROGUE || gamemode == GAME_QUOTH || gamemode == GAME_NEXUIZ)
+               if (gamemode == GAME_HIPNOTIC || gamemode == GAME_ROGUE || gamemode == GAME_QUOTH || IS_OLDNEXUIZ_DERIVED(gamemode))
                        cl.stats[STAT_ACTIVEWEAPON] = (1<<MSG_ReadByte(&cl_message));
                else
                        cl.stats[STAT_ACTIVEWEAPON] = MSG_ReadByte(&cl_message);