]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
cl_readpicture_force: force the low quality jpeg image to be used even if the image...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 29 Jul 2008 06:08:43 +0000 (06:08 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 29 Jul 2008 06:08:43 +0000 (06:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8428 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
clvm_cmds.c

index 6b7c258510985fe7617a5de6914dae1ea57f8cac..6b8e372ae3289a8024b75ed23d813f4a6ce21f25 100644 (file)
@@ -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
@@ -3874,6 +3875,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)");
index cf2ddba271b967c77c5455bd7d2dec8178fe6355..5ed6a046fdd3ed9e621feafa9e41d16476d6b6cd 100644 (file)
@@ -1311,6 +1311,7 @@ static void VM_CL_ReadFloat (void)
 }
 
 //#501 string() readpicture (DP_CSQC_READWRITEPICTURE)
+extern cvar_t cl_readpicture_force;
 static void VM_CL_ReadPicture (void)
 {
        const char *name;
@@ -1335,7 +1336,7 @@ static void VM_CL_ReadPicture (void)
        {
                if(pic->tex == r_texture_notexture)
                        pic->tex = NULL; // don't overwrite the notexture by Draw_NewPic
-               if(pic->tex)
+               if(pic->tex && !cl_readpicture_force.integer)
                {
                        // texture found and loaded
                        // skip over the jpeg as we don't need it