diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/shadows/dynamicshadows.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/shadows/dynamicshadows.cpp b/src/client/shadows/dynamicshadows.cpp index a45bf64fe..2995ec205 100644 --- a/src/client/shadows/dynamicshadows.cpp +++ b/src/client/shadows/dynamicshadows.cpp @@ -93,6 +93,8 @@ void DirectionalLight::update_frustum(const Camera *cam, Client *client, bool fo float zNear = cam->getCameraNode()->getNearValue(); float zFar = getMaxFarValue(); + if (!client->getEnv().getClientMap().getControl().range_all) + zFar = MYMIN(zFar, client->getEnv().getClientMap().getControl().wanted_range * BS); /////////////////////////////////// // update splits near and fars |