]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix cloud fog being broken for high clouds
authorWuzzy <Wuzzy2@mail.ru>
Tue, 25 May 2021 21:44:41 +0000 (23:44 +0200)
committersfan5 <sfan5@live.de>
Sat, 29 May 2021 09:44:31 +0000 (11:44 +0200)
src/client/clouds.cpp

index 5008047af8bb1100b677297b0bdbdbbdb6466e3f..383a1d799e963f2afec9396f059bc11617bf9144 100644 (file)
@@ -352,7 +352,7 @@ void Clouds::update(const v3f &camera_p, const video::SColorf &color_diffuse)
        // is the camera inside the cloud mesh?
        m_camera_inside_cloud = false; // default
        if (m_enable_3d) {
-               float camera_height = camera_p.Y;
+               float camera_height = camera_p.Y - BS * m_camera_offset.Y;
                if (camera_height >= m_box.MinEdge.Y &&
                                camera_height <= m_box.MaxEdge.Y) {
                        v2f camera_in_noise;