From: cloudwalk Date: Mon, 15 Jun 2020 00:47:34 +0000 (+0000) Subject: Avoid setting "r_transparent_sortmindist" to 0 every frame if already 0 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a4b120bcd8890a43d1ae0afc59c88fb0b6e1715d;p=xonotic%2Fdarkplaces.git Avoid setting "r_transparent_sortmindist" to 0 every frame if already 0 If an integer is less than 1, it can only be 0. This should fix console spam with developer_extra 1. https://gitlab.com/xonotic/darkplaces/-/merge_requests/87 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12675 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/meshqueue.c b/meshqueue.c index edd85c22..af8c3ea5 100644 --- a/meshqueue.c +++ b/meshqueue.c @@ -1,4 +1,3 @@ - #include "quakedef.h" #include "meshqueue.h" @@ -76,7 +75,7 @@ void R_MeshQueue_RenderTransparent(void) // check for bad cvars if (r_transparent_sortarraysize.integer < 1 || r_transparent_sortarraysize.integer > 32768) Cvar_SetValueQuick(&r_transparent_sortarraysize, bound(1, r_transparent_sortarraysize.integer, 32768)); - if (r_transparent_sortmindist.integer < 1 || r_transparent_sortmindist.integer >= r_transparent_sortmaxdist.integer) + if (r_transparent_sortmindist.integer < 0 || r_transparent_sortmindist.integer >= r_transparent_sortmaxdist.integer) Cvar_SetValueQuick(&r_transparent_sortmindist, 0); if (r_transparent_sortmaxdist.integer < r_transparent_sortmindist.integer || r_transparent_sortmaxdist.integer > 32768) Cvar_SetValueQuick(&r_transparent_sortmaxdist, bound(r_transparent_sortmindist.integer, r_transparent_sortmaxdist.integer, 32768));