aboutsummaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 0e86de496..34bfb5aa6 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -4065,10 +4065,7 @@ void Game::updateShadows()
timeoftheday = fmod(timeoftheday + 0.75f, 0.5f) + 0.25f;
const float offset_constant = 10000.0f;
- v3f light(0.0f, 0.0f, -1.0f);
- light.rotateXZBy(90);
- light.rotateXYBy(timeoftheday * 360 - 90);
- light.rotateYZBy(sky->getSkyBodyOrbitTilt());
+ v3f light = is_day ? sky->getSunDirection() : sky->getMoonDirection();
v3f sun_pos = light * offset_constant;