X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=cl_parse.c;h=d5cb5896af55d0020af023d9f3fa8c1548bf76bc;hb=2cbfd57208b7e0050bf532456dedae601670af88;hp=6b7c258510985fe7617a5de6914dae1ea57f8cac;hpb=f87cf4e9590a353b5253b5bf098ec4450d49a965;p=xonotic%2Fdarkplaces.git diff --git a/cl_parse.c b/cl_parse.c index 6b7c2585..d5cb5896 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -168,6 +168,7 @@ cvar_t cl_sound_tink1 = {0, "cl_sound_tink1", "weapons/tink1.wav", "sound to pla cvar_t cl_sound_ric1 = {0, "cl_sound_ric1", "weapons/ric1.wav", "sound to play with 5% chance during TE_SPIKE/TE_SUPERSPIKE (empty cvar disables sound)"}; cvar_t cl_sound_ric2 = {0, "cl_sound_ric2", "weapons/ric2.wav", "sound to play with 5% chance during TE_SPIKE/TE_SUPERSPIKE (empty cvar disables sound)"}; cvar_t cl_sound_ric3 = {0, "cl_sound_ric3", "weapons/ric3.wav", "sound to play with 10% chance during TE_SPIKE/TE_SUPERSPIKE (empty cvar disables sound)"}; +cvar_t cl_readpicture_force = {0, "cl_readpicture_force", "0", "when enabled, the low quality pictures read by ReadPicture() are preferred over the high quality pictures on the file system"}; #define RIC_GUNSHOT 1 #define RIC_GUNSHOTQUAD 2 @@ -423,6 +424,7 @@ static void CL_SetupWorldModel(void) if (cl.loadcsqc) { cl.loadcsqc = false; + CL_VM_Init(); } } @@ -432,7 +434,7 @@ static qboolean QW_CL_CheckOrDownloadFile(const char *filename) qfile_t *file; // see if the file already exists - file = FS_Open(filename, "rb", true, false); + file = FS_OpenVirtualFile(filename, true); if (file) { FS_Close(file); @@ -1044,7 +1046,7 @@ void CL_BeginDownloads(qboolean aborteddownload) } if(gamemode == GAME_NEXUIZ) - goto skipdownloads; + Cvar_SetValueQuick(&cl_serverextension_download, false); // 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 @@ -1101,6 +1103,8 @@ void CL_BeginDownloads(qboolean aborteddownload) if (cl.downloadmodel_current == 1) { // we now have the worldmodel so we can set up the game world + // or maybe we do not have it (cl_serverextension_download 0) + // then we need to continue loading ANYWAY! CL_SetupWorldModel(); if (!cl.loadfinished && cl_joinbeforedownloadsfinish.integer) { @@ -1149,7 +1153,6 @@ void CL_BeginDownloads(qboolean aborteddownload) // finished loading sounds } -skipdownloads: if (!cl.loadfinished) { cl.loadfinished = true; @@ -1637,12 +1640,13 @@ void CL_ParseServerInfo (void) Con_Printf ("Auto-recording to %s.\n", demofile); - cls.demofile = FS_Open (demofile, "wb", false, false); + cls.demofile = FS_OpenRealFile(demofile, "wb", false); if (cls.demofile) { cls.forcetrack = -1; FS_Printf (cls.demofile, "%i\n", cls.forcetrack); cls.demorecording = true; + strlcpy(cls.demoname, demofile, sizeof(cls.demoname)); } else Con_Print ("ERROR: couldn't open.\n"); @@ -3874,6 +3878,7 @@ void CL_Parse_Init(void) Cvar_RegisterVariable(&cl_nettimesyncboundmode); Cvar_RegisterVariable(&cl_nettimesyncboundtolerance); Cvar_RegisterVariable(&cl_iplog_name); + Cvar_RegisterVariable(&cl_readpicture_force); Cmd_AddCommand("nextul", QW_CL_NextUpload, "sends next fragment of current upload buffer (screenshot for example)"); Cmd_AddCommand("stopul", QW_CL_StopUpload, "aborts current upload (screenshot for example)");