From a4b120bcd8890a43d1ae0afc59c88fb0b6e1715d Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Mon, 15 Jun 2020 00:47:34 +0000 Subject: [PATCH] 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 --- meshqueue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)); -- 2.39.2