]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Avoid setting "r_transparent_sortmindist" to 0 every frame if already 0
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 15 Jun 2020 00:47:34 +0000 (00:47 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 15 Jun 2020 00:47:34 +0000 (00:47 +0000)
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

meshqueue.c

index edd85c227ac83c14e8f19fc56b966d4ae228d15c..af8c3ea5faa3607cbd846c3dcbc94b8f1ada021a 100644 (file)
@@ -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));