r_refdef.fog_start = 0;
r_refdef.fog_alpha = 1;
r_refdef.fog_end = 16384;
+#if _MSC_VER >= 1400
+#define sscanf sscanf_s
+#endif
sscanf(value, "%f %f %f %f %f %f %f", &r_refdef.fog_density, &r_refdef.fog_red, &r_refdef.fog_green, &r_refdef.fog_blue, &r_refdef.fog_alpha, &r_refdef.fog_start, &r_refdef.fog_end);
}
else if (!strcmp("fog_density", key))
// finished loading sounds
}
+ if(gamemode == GAME_NEXUIZ)
+ goto skipdownloads;
+ // in Nexuiz, the built in download protocol is kinda broken (misses lots
+ // of dependencies) anyway, and can mess around with the game directory;
+ // until this is fixed, only support pk3 downloads via curl, and turn off
+ // individual file downloads other than for CSQC
+ // on the other end of the download protocol, GAME_NEXUIZ enforces writing
+ // to dlcache only
+ // idea: support download of pk3 files using this protocol later
+
// note: the reason these loops skip already-loaded things is that it
// enables this command to be issued during the game if desired
// finished loading sounds
}
+skipdownloads:
if (!cl.loadfinished)
{
cl.loadfinished = true;
// 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)
+ if (existingsize || gamemode == GAME_NEXUIZ || !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
{
if ((int)existingsize != size || existingcrc != crc)
{