MantisBT - Zandronum
View Issue Details
0002312Zandronum[All Projects] Bugpublic2015-06-14 20:432018-09-30 21:40
Edward-san 
Edward-san 
highmajoralways
closedfixed 
2.0 
2.22.2 
0002312: sv_forcegldefaults 1 does not cover gl_distfog changes.
If gl_distfog is set to 0, the fog is disabled even though sv_forcegldefaults is set to 1.
No tags attached.
related to 0002258closed Edward-san sv_forcegldefaults is broken 
Issue History
2015-06-14 20:43Edward-sanNew Issue
2015-06-14 20:43Edward-sanStatusnew => assigned
2015-06-14 20:43Edward-sanAssigned To => Edward-san
2015-06-14 20:44Edward-sanRelationship addedrelated to 0002258
2015-06-14 21:04Edward-sanNote Added: 0012726
2015-06-14 21:04Edward-sanStatusassigned => needs review
2015-06-14 21:05Edward-sanDescription Updatedbug_revision_view_page.php?rev_id=7455#r7455
2015-06-14 21:18Edward-sanNote Added: 0012728
2015-06-20 13:06unknownnaNote Added: 0012759
2015-06-21 08:54Torr SamahoNote Added: 0012766
2015-06-21 08:54Torr SamahoStatusneeds review => feedback
2015-06-21 09:12Edward-sanNote Added: 0012767
2015-06-21 09:12Edward-sanStatusfeedback => assigned
2015-06-21 09:12Edward-sanStatusassigned => needs review
2015-06-21 09:29Torr SamahoNote Added: 0012768
2015-06-21 09:30Torr SamahoStatusneeds review => feedback
2015-06-21 10:00Edward-sanNote Added: 0012769
2015-06-21 10:00Edward-sanStatusfeedback => assigned
2015-06-21 10:00Edward-sanStatusassigned => needs review
2015-06-21 10:25Edward-sanNote Edited: 0012769bug_revision_view_page.php?bugnote_id=12769#r7519
2015-06-21 14:04Torr SamahoNote Added: 0012770
2015-06-21 14:04Torr SamahoStatusneeds review => feedback
2015-06-21 14:44Edward-sanNote Added: 0012771
2015-06-21 14:44Edward-sanStatusfeedback => assigned
2015-06-21 14:44Edward-sanStatusassigned => needs review
2015-06-21 14:45Edward-sanNote Edited: 0012771bug_revision_view_page.php?bugnote_id=12771#r7521
2015-06-24 22:43DuskTarget Version2.1 => 2.2
2015-12-01 11:20Edward-sanNote Added: 0013927
2015-12-05 12:11Torr SamahoStatusneeds review => needs testing
2015-12-06 20:12cobaltNote Added: 0013941
2016-05-06 22:02Ru5tK1ngNote Added: 0014830
2016-05-06 22:03Ru5tK1ngStatusneeds testing => resolved
2016-05-06 22:03Ru5tK1ngResolutionopen => fixed
2016-05-06 22:03Ru5tK1ngFixed in Version => 2.2
2018-09-30 21:40Blzut3Statusresolved => closed

Notes
(0012726)
Edward-san   
2015-06-14 21:04   
Should be taken care of with'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/d277446ec0b9cf74d85c66703549ece5d6d952d4 [^]' .
(0012728)
Edward-san   
2015-06-14 21:18   
Build with the fix:'https://www.dropbox.com/s/anco00od31qg2ok/zandronum-2.1-150614-2059-d277446-windows.zip?dl=0 [^]' .
(0012759)
unknownna   
2015-06-20 13:06   
Yeah, that seems to work fine.
(0012766)
Torr Samaho   
2015-06-21 08:54   
Copying any pasting the large for loop doesn't look like a clean way to fix this.
(0012767)
Edward-san   
2015-06-21 09:12   
What about'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/91e0d813570154992094489cb450114e6c9096e4 [^]' ?
(0012768)
Torr Samaho   
2015-06-21 09:29   
That's better but has a large delta to the original GZDoom code.

Does the usual trick with the define not work if you put it inside the
CUSTOM_CVAR (Int, gl_distfog ...
block, combined with with the necessary addition in zadmflags (like done for gl_lightmode)?
(0012769)
Edward-san   
2015-06-21 10:00   
(edited on: 2015-06-21 10:25)
I'm lost there, but I improved the code and should be okay with delta:'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/86e82b058afd69e7bcdc41018ce4a58f20e218e5 [^]'

Found an useless delta inside the function. Removed with'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/6e43e0480b149f4efbc014be655169a061d2638a [^]' .

(0012770)
Torr Samaho   
2015-06-21 14:04   
The biggest delta is that you rip out the code that creates the table from the place where it is in GZDoom and move it elsewhere. Your recent changes have no effect on this.

What I meant is, what prevents you from putting
OVERRIDE_INT_GL_CVAR_IF_NECESSARY( gl_distfog )

into

CUSTOM_CVAR (Int, gl_distfog ...

and

gl_distfog.Callback();

into

CUSTOM_CVAR (Int, zadmflags, ...

? It may not work exactly like this, but is there anything that prevents us from using this general strategy that we already successfully apply for all the other GL settings?
(0012771)
Edward-san   
2015-06-21 14:44   
(edited on: 2015-06-21 14:45)
It seems I overlooked that.'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/e8b7e5bd26aef86e98ce7c49d0832730907b88a2 [^]' should handle this.

(0013927)
Edward-san   
2015-12-01 11:20   
Recovered the fix from the old repository:'https://bitbucket.org/Torr_Samaho/zandronum-stable/pull-requests/18/fixed-sv_forcegldefaults-1-didnt-cover/diff [^]'
(0013941)
cobalt   
2015-12-06 20:12   
Issue addressed by commit d60f6521ed73: - Fixed: sv_forcegldefaults 1 didn't cover gl_distfog changes (addresses 2312).
Committed by Edoardo Prezioso [edward-san] on Tuesday 01 December 2015 12:18:44

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/d_main.cpp | 8 ++++++--
 src/gl/renderer/gl_lightdata.cpp | 3 +++
 3 files changed, 10 insertions(+), 2 deletions(-)

(0014830)
Ru5tK1ng   
2016-05-06 22:02   
Tested this with r160410-1037 and distfog couldn't be toggled with forced defaults on.