From: divverent Date: Tue, 29 Jul 2008 06:08:43 +0000 (+0000) Subject: cl_readpicture_force: force the low quality jpeg image to be used even if the image... X-Git-Tag: xonotic-v0.1.0preview~2153 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4a387dfae946c0d01c34f10fe0b11a6c6c1e2358;p=xonotic%2Fdarkplaces.git cl_readpicture_force: force the low quality jpeg image to be used even if the image exists on the file system (for testing) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8428 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_parse.c b/cl_parse.c index 6b7c2585..6b8e372a 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 @@ -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)"); diff --git a/clvm_cmds.c b/clvm_cmds.c index cf2ddba2..5ed6a046 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -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