summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index fc780a808..5c3805c3b 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2505,8 +2505,7 @@ void the_game(
Calculate general brightness
*/
u32 daynight_ratio = client.getEnv().getDayNightRatio();
- float time_brightness = (float)decode_light(
- (daynight_ratio * LIGHT_SUN) / 1000) / 255.0;
+ float time_brightness = decode_light_f((float)daynight_ratio/1000.0);
float direct_brightness = 0;
bool sunlight_seen = false;
if(g_settings->getBool("free_move")){