Created
September 3, 2013 11:19
-
-
Save kahrl/6422576 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/game.cpp b/src/game.cpp | |
index 650b5e2..d3d49d7 100644 | |
--- a/src/game.cpp | |
+++ b/src/game.cpp | |
@@ -794,9 +794,9 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter | |
services->setPixelShaderConstant("skyBgColor", bgcolorfa, 4); | |
// Fog distance | |
- float fog_distance = *m_fog_range; | |
- if(*m_force_fog_off) | |
- fog_distance = 10000*BS; | |
+ float fog_distance = 10000*BS; | |
+ if(g_settings->getBool("enable_fog") && !*m_force_fog_off) | |
+ fog_distance = *m_fog_range; | |
services->setPixelShaderConstant("fogDistance", &fog_distance, 1); | |
// Day-night ratio | |
@@ -2928,7 +2928,7 @@ void the_game( | |
Fog | |
*/ | |
- if(g_settings->getBool("enable_fog") == true && !force_fog_off) | |
+ if(g_settings->getBool("enable_fog") && !force_fog_off) | |
{ | |
driver->setFog( | |
bgcolor, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment