]> git.lizzy.rs Git - minetest.git/blobdiff - src/client/clouds.cpp
Fix shadows for upright sprite nodes
[minetest.git] / src / client / clouds.cpp
index 5a075aaf0d25ccde3bdede4fadfd602a5bf298f1..383a1d799e963f2afec9396f059bc11617bf9144 100644 (file)
@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 // Menu clouds are created later
 class Clouds;
 Clouds *g_menuclouds = NULL;
-irr::scene::ISceneManager *g_menucloudsmgr = NULL;
+scene::ISceneManager *g_menucloudsmgr = NULL;
 
 // Constant for now
 static constexpr const float cloud_size = BS * 64.0f;
@@ -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;